C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-05-2001, 09:34 PM   #1
Registered User
 
oomakoo's Avatar
 
Join Date: Dec 2001
Posts: 8
.so and top level static

I have a program that is invoked many times simultaneously. The program uses a dynamic library. In the library there is a top level static integer that I want to have a unique value for each invocation of my program.

Q: will the value of this integer be unique for each invocation of my program?

I've tried it and it seems to work but I would like to double check my results.
oomakoo is offline   Reply With Quote
Old 12-06-2001, 12:18 AM   #2
Registered User
 
Join Date: Aug 2001
Posts: 202
depending on the language.

In C, use a #define
in java. declare it static final
etc.

as long as you're using the language's method of making sure that the number doesn't get changed, it won't get changed.

starX
www.axisoftime.com
starX is offline   Reply With Quote
Old 12-06-2001, 12:43 AM   #3
Registered User
 
oomakoo's Avatar
 
Join Date: Dec 2001
Posts: 8
I am using C and the variable in the .so is a static int.

My program calls one of the functions in the .so and initialises it to a unique value. Then control returns back to the program. Then, I call a different function in the .so and use the value in the static int.

If another invocation of the program is using the same .so will it over-write the value in the static int?

Should I have posted this to the C board?
oomakoo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting a swf file in a windows application face_master Windows Programming 12 05-03-2009 11:29 AM
Multiple Top Level Windows quark_77 Windows Programming 0 07-13-2008 02:32 PM
Taskbars; 'Cannot create top level child window' Gerread Windows Programming 4 05-18-2007 06:41 AM
Dialog window with top level menu Frandy Windows Programming 2 09-22-2004 10:53 AM
Stack functions as arrays instead of node pointers sballew C Programming 8 12-04-2001 11:13 AM


All times are GMT -6. The time now is 04:50 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22