devdraw: draft cocoa support
R=rsc CC=plan9port.codebot http://codereview.appspot.com/4974060
This commit is contained in:
parent
f0a4e8bd6c
commit
a287dbab23
8 changed files with 1340 additions and 0 deletions
27
src/cmd/devdraw/cocoa-thread.h
Normal file
27
src/cmd/devdraw/cocoa-thread.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#define QLock DQLock
|
||||
#define qlock dqlock
|
||||
#define qunlock dqunlock
|
||||
#define Rendez DRendez
|
||||
#define rsleep drsleep
|
||||
#define rwakeup drwakeup
|
||||
|
||||
typedef struct QLock QLock;
|
||||
typedef struct Rendez Rendez;
|
||||
|
||||
struct QLock
|
||||
{
|
||||
pthread_mutex_t m;
|
||||
int init;
|
||||
};
|
||||
|
||||
struct Rendez
|
||||
{
|
||||
QLock *l;
|
||||
pthread_cond_t c;
|
||||
int init;
|
||||
};
|
||||
|
||||
void qlock(QLock*);
|
||||
void qunlock(QLock*);
|
||||
void rsleep(Rendez*);
|
||||
int rwakeup(Rendez*); /* BUG: always returns 0 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue