Sponsored Content
Full Discussion: scope
Top Forums Programming scope Post 302078163 by Corona688 on Wednesday 28th of June 2006 11:08:28 AM
Old 06-28-2006
Quote:
Originally Posted by jim mcnamara
There is one and only one copy of BSS in memory. You can think of each thread, in a conventional POSIX thread environment, as memory allocated to a function that is scheduled separately, as if it were a process. If, for example, you're on Linux prior to kernel 2.6, then this is not true, it's more like separate processes for each thread, with multiple copies of BSS.
Are you certain of this? Threads couldn't do much if thread memory wasn't shared! Even seperate processes can share memory..
 

10 More Discussions You Might Find Interesting

1. Programming

C++: scope, different files etc..

I'm having a problem getting this to work.. I got 3 files, start.C - Where i got my main() function Menu.C & Menu.h - Where I'm trying to use hash_map start.C #include <iostream> #include "Menu.h" using namespace std; int main() { /* test code here */ return 0; } Menu.h ... (1 Reply)
Discussion started by: J.P
1 Replies

2. AIX

Scope of AIX

What is the scope of AIX as I am starting my career as a fresher in AIX administration?? (4 Replies)
Discussion started by: abhishek27
4 Replies

3. Shell Programming and Scripting

Variables scope.

Hi , I'm trying to change the variable value in a while loop , however its not working it seems that the problem with subshells while reading the file. #!/bin/sh FLAG=0; cat filename | while read data do FLAG=1; done echo $FLAG Should display 1 instead displays 0 (13 Replies)
Discussion started by: dinjo_jo
13 Replies

4. Shell Programming and Scripting

scope of the variable - Naga

Hi All, I am new to unix shell scripting, in the below script "num" is an input file which contains a series of numbers example : 2 3 5 8 I want to add the above all numbers and want the result finally outside the while loop. it prints the value zero instead of the actual expected... (13 Replies)
Discussion started by: nagnatar
13 Replies

5. Shell Programming and Scripting

variable scope

Hi, I want to know about the variable scope in shell script. How can we use the script argument inside the function? fn () { echo $1 ## I want this argument should be the main script argument and not the funtion argument. } also are there any local,global types in shell script? if... (3 Replies)
Discussion started by: shellwell
3 Replies

6. AIX

`pthread_rwlock_t' was not declared in this scope

Hello All, I am getting this error while compiling my application on IBM AIX 5.3. As I tried to define _XOPEN_SOURCE=500 in makefile, that didn't work. Please help us to resolve the error. (0 Replies)
Discussion started by: mustus
0 Replies

7. Shell Programming and Scripting

Scope of variables between scripts

Friends, I am using ksh under SunoS. This is what I have In file1.sh NOW=$(date +"%b-%d-%y") LOGFILE="./log-$NOW.log" I will be using this file through file1.sh as log file. I have another script file2.sh which is being called inside my file1.sh. I would like to use the same log... (6 Replies)
Discussion started by: dahlia84
6 Replies

8. Shell Programming and Scripting

bc: scope doesn't work for me

I am trying to use bc to calculate the difference between two nano second time stamps. bc does the calculation but seems to ignore the scale option: micro_start=$(date +%s.%N) # .. some stuff happens here micro_stop=$(date +%s.%N) TOT=$(echo "scale=3; $micro_stop - $micro_start" | bc)... (2 Replies)
Discussion started by: LostInTheWoods
2 Replies

9. Shell Programming and Scripting

Help with retaining variable scope

Hi, I use Korn Shell. Searched Forum and modified the way the file is input to the while loop, but still the variable does not seem to be retaining the final count. while read name do Tmp=`echo $name | awk '{print $9 }'` Count=`cat $Tmp | wc -l`... (6 Replies)
Discussion started by: justchill
6 Replies

10. Shell Programming and Scripting

Variable scope in bash

Hello! Before you "bash" me with - Not another post of this kind Please read on and you will understand my problem... I am using the below to extract a sum of the diskIO on a Solaris server. #!/bin/sh PATH=/usr/bin:/usr/sbin:/sbin; export PATH TEMP1="/tmp/raw-sar-output.txt$$"... (3 Replies)
Discussion started by: haaru
3 Replies
SbThread(3)							       Coin							       SbThread(3)

NAME
SbThread - A class for managing threads. This class provides a portable framework around the tasks of instantiating, starting, stopping and joining threads. SYNOPSIS
#include <Inventor/threads/SbThread.h> Public Member Functions SbBool join (void **retval=0L) Static Public Member Functions static SbThread * create (void *(*func)(void *), void *closure) static void destroy (SbThread *thread) static SbBool join (SbThread *thread, void **retval=0L) Protected Member Functions SbThread (cc_thread *thrd) ~SbThread (void) Detailed Description A class for managing threads. This class provides a portable framework around the tasks of instantiating, starting, stopping and joining threads. It wraps the underlying native thread-handling toolkit in a transparent manner, to make multiplatform threads programming straightforward for the application programmer. Constructor &; Destructor Documentation SbThread::SbThread (cc_thread *thread) [inline], [protected] Protected constructor handling the internal thread ADT. See also: SbThread::create SbThread::~SbThread (void) [inline], [protected] Destructor. See also: SbThread::destroy Member Function Documentation static SbThread * SbThread::create (void *(*)(void *)func, void *closure) [inline], [static] This function creates a new thread, or returns NULL on failure. static void SbThread::destroy (SbThread *thread) [inline], [static] This function destroys a thread. int SbThread::join (void **retval = 0L) [inline] This function waits on the death of the given thread, returning the thread's return value at the location pointed to by retval. static int SbThread::join (SbThread *thread, void **retval = 0L) [inline], [static] This function waits on the death of the given thread, returning the thread's return value at the location pointed to by retval. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SbThread(3)
All times are GMT -4. The time now is 05:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy