pthread_create parameters
Hello.
Is it possible to pass more than one argument to the thread when you use pthread_create(...)?? Everything I have read on it says just one, but no where does it say you can have ONLY one. Also, if it is not possible to send more than one, any ideas on how to use variables that were created in Main() and could not have been made global (taken in from command line)? Thanks for any insight!! -AquamaN |
hi,
as far as i know the only way to pass multiple parameters to pthread_create is by using a struct containing them.. |
Yeah, I know of that way too but I am taking in variables from the command line in main() so I can not create the struct using those variables (or atleast as far as I know I can't.) Thanks for your response.
-AquamaN |
Wow... I'm a tool. I failed to realize that I could just pass them into the struct as I take them into the main function... duh...
|
All times are GMT -5. The time now is 09:47 PM. |