Re: Threads and C functions
Re: Threads and C functions
- Subject: Re: Threads and C functions
- From: Clark Cox <email@hidden>
- Date: Thu, 10 Feb 2005 21:34:06 -0500
On Thu, 10 Feb 2005 19:03:16 -0500, Ken Tozier <email@hidden> wrote:
> Hi all,
>
> I wrote some C utility functions that are shared by a number of classes
> but don't know enough about threads to know if I have to do anything
> special with the functions to make them thread safe.
>
> If two non-interacting threads call the same C function with different
> data, are there any inherent problems? Or does the compiler take care
> of access to the function?
If they really don't interact with the same data, and you can be
absolutely sure of this (i.e. be sure the function doesn't end up
calling something else that relies on global state, etc.), then there
is indeed nothing needed to "take care" of access to the function.
--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden