rt-thread/components/pthreads/pthread_spin.h
bernard.xiong@gmail.com 468db50159 update pthreads components.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1046 bbd45198-f89e-11dd-88c7-29a3b14d5316
2010-11-15 00:25:37 +00:00

20 lines
529 B
C

#ifndef __PTHREAD_SPIN_H__
#define __PTHREAD_SPIN_H__
#include <pthread.h>
/* spinlock implementation, (ADVANCED REALTIME THREADS)*/
struct pthread_spinlock
{
int lock;
};
typedef struct pthread_spinlock pthread_spinlock_t;
int pthread_spin_init (pthread_spinlock_t *lock, int pshared);
int pthread_spin_destroy (pthread_spinlock_t *lock);
int pthread_spin_lock (pthread_spinlock_t * lock);
int pthread_spin_trylock (pthread_spinlock_t * lock);
int pthread_spin_unlock (pthread_spinlock_t * lock);
#endif