• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Threads and C functions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Threads and C functions (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: Fade out the window content
  • Next by Date: Re: Threads and C functions
  • Previous by thread: Threads and C functions
  • Next by thread: Re: Threads and C functions
  • Index(es):
    • Date
    • Thread