pthread_spin.h 473 B

123456789101112131415161718
  1. #ifndef __PTHREAD_SPIN_H__
  2. #define __PTHREAD_SPIN_H__
  3. #include <pthread.h>
  4. struct pthread_spinlock
  5. {
  6. int pshared;
  7. };
  8. typedef struct pthread_spinlock pthread_spinlock_t;
  9. int pthread_spin_init (pthread_spinlock_t *lock, int pshared);
  10. int pthread_spin_destroy (pthread_spinlock_t *lock);
  11. int pthread_spin_lock (pthread_spinlock_t * lock);
  12. int pthread_spin_trylock (pthread_spinlock_t * lock);
  13. int pthread_spin_unlock (pthread_spinlock_t * lock);
  14. #endif