HELP! * GREY=local LOCAL HTML version of Foils prepared July 6,1995

Foil 33 TCE -- Implementation -- 12: Thread Synchronization

From Master Foils for Threads with TCE in detail CPS600 Spring Semester95 -- April 1995. by Janusz Niemiec and Geoffrey Fox * See also color IMAGE

In order to synchronize threads' activities TCE provides operations on semaphores.
A semaphore is an object, which has to be created by the tce_sem_init function. After initializing, three additional operations are available:
  • tce_sem_up -- increments the semaphore, when value is now 0, the first thread blocked on this semaphore will be allowed to proceed, and the counter will be set to a negative value again.
  • tce_sem_down -- tries to decrement the specified semaphore, if the value already less than 0 the thread issuing this operation will be blocked on that semaphore and the value will not be changed.
  • tce_sem_free -- allows to proceed all threads which have been blocked on this semaphore, the semaphore counter will be reset to 0.



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Feb 18 1997