/*
* Copyright (c) 1994 by Xerox Corporation. All rights reserved.
* Copyright (c) 1996 by Silicon Graphics. All rights reserved.
* Copyright (c) 1998 by Fergus Henderson. All rights reserved.
* Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
* All rights reserved.
*
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
*
* Permission is hereby granted to use or copy this program
* for any purpose, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*/
#if !defined(GC_DARWIN_THREADS) && !defined(GC_WIN32_THREADS)
# error darwin_semaphore.h included for improper target
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* This is a very simple semaphore implementation based on pthreads. */
/* It is not async-signal safe. But this is not a problem because */
/* signals are not used to suspend threads on the target. */