2011-03-30 13:47:56 +00:00
|
|
|
#if !defined(_RESEARCH_SOURCE) && !defined(_PLAN9_SOURCE)
|
|
|
|
This header file is an extension of ANSI/POSIX
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __LOCK_H
|
|
|
|
#define __LOCK_H
|
|
|
|
#pragma lib "/$M/lib/ape/libap.a"
|
|
|
|
|
|
|
|
#include <u.h>
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2013-09-26 20:24:31 +00:00
|
|
|
int val;
|
2011-03-30 13:47:56 +00:00
|
|
|
} Lock;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern void lock(Lock*);
|
|
|
|
extern void unlock(Lock*);
|
|
|
|
extern int canlock(Lock*);
|
|
|
|
extern int tas(int*);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|