semaphore.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * -------------------------------------------------------------
  3. *
  4. * Module: semaphore.c
  5. *
  6. * Purpose:
  7. * Concatenated version of separate modules to allow
  8. * inlining optimisation, which it is assumed can only
  9. * be effective within a single module.
  10. *
  11. * Semaphores aren't actually part of the PThreads standard.
  12. * They are defined by the POSIX Standard:
  13. *
  14. * POSIX 1003.1b-1993 (POSIX.1b)
  15. *
  16. * -------------------------------------------------------------
  17. *
  18. * --------------------------------------------------------------------------
  19. *
  20. * Pthreads-win32 - POSIX Threads Library for Win32
  21. * Copyright(C) 1998 John E. Bossom
  22. * Copyright(C) 1999,2005 Pthreads-win32 contributors
  23. *
  24. * Contact Email: [email protected]
  25. *
  26. * The current list of contributors is contained
  27. * in the file CONTRIBUTORS included with the source
  28. * code distribution. The list can also be seen at the
  29. * following World Wide Web location:
  30. * http://sources.redhat.com/pthreads-win32/contributors.html
  31. *
  32. * This library is free software; you can redistribute it and/or
  33. * modify it under the terms of the GNU Lesser General Public
  34. * License as published by the Free Software Foundation; either
  35. * version 2 of the License, or (at your option) any later version.
  36. *
  37. * This library is distributed in the hope that it will be useful,
  38. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  39. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  40. * Lesser General Public License for more details.
  41. *
  42. * You should have received a copy of the GNU Lesser General Public
  43. * License along with this library in the file COPYING.LIB;
  44. * if not, write to the Free Software Foundation, Inc.,
  45. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  46. */
  47. #if !defined(NEED_FTIME)
  48. # include <sys/timeb.h>
  49. #endif
  50. #include <limits.h>
  51. #include "pthread.h"
  52. #include "semaphore.h"
  53. #include "implement.h"
  54. #include "sem_init.c"
  55. #include "sem_destroy.c"
  56. #include "sem_trywait.c"
  57. #include "sem_wait.c"
  58. #include "sem_timedwait.c"
  59. #include "sem_post.c"
  60. #include "sem_post_multiple.c"
  61. #include "sem_getvalue.c"
  62. #include "sem_open.c"
  63. #include "sem_close.c"
  64. #include "sem_unlink.c"