dwl_linux_lock.h 1.7 KB

1234567891011121314151617181920212223242526272829303132
  1. /*------------------------------------------------------------------------------
  2. -- --
  3. -- This software is confidential and proprietary and may be used --
  4. -- only as expressly authorized by a licensing agreement from --
  5. -- --
  6. -- Hantro Products Oy. --
  7. -- --
  8. -- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
  9. -- ALL RIGHTS RESERVED --
  10. -- --
  11. -- The entire notice above must be reproduced --
  12. -- on all copies and should not be removed. --
  13. -- --
  14. --------------------------------------------------------------------------------
  15. --
  16. -- Description : Locking semaphore for hardware sharing
  17. --
  18. ------------------------------------------------------------------------------*/
  19. #ifndef __DWL_LINUX_LOCK_H__
  20. #define __DWL_LINUX_LOCK_H__
  21. #include <sys/types.h>
  22. #include <sys/ipc.h>
  23. int binary_semaphore_allocation(key_t key, int nsem, int sem_flags);
  24. int binary_semaphore_deallocate(int semid);
  25. int binary_semaphore_wait(int semid, int sem_num);
  26. int binary_semaphore_post(int semid, int sem_num);
  27. int binary_semaphore_initialize(int semid, int sem_num);
  28. #endif /* __DWL_LINUX_LOCK_H__ */