mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
devdraw: update Lion cocoa
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5015042
This commit is contained in:
parent
53000799be
commit
48107872ba
8 changed files with 627 additions and 430 deletions
|
@ -1,5 +1,5 @@
|
|||
<$PLAN9/src/mkhdr
|
||||
<|./osxvers
|
||||
<|osxvers
|
||||
|
||||
TARG=9pfuse
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ void setlabel(char*);
|
|||
char* getsnarf(void);
|
||||
void putsnarf(char*);
|
||||
|
||||
void mousetrack(int, int, int, int);
|
||||
void mousetrack(int, int, int, uint);
|
||||
void keystroke(int);
|
||||
void kicklabel(char*);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -308,7 +308,7 @@ matchmouse(void)
|
|||
}
|
||||
|
||||
void
|
||||
mousetrack(int x, int y, int b, int ms)
|
||||
mousetrack(int x, int y, int b, uint ms)
|
||||
{
|
||||
Mouse *m;
|
||||
|
||||
|
|
|
@ -23,32 +23,3 @@ qunlock(QLock *q)
|
|||
{
|
||||
pthread_mutex_unlock(&q->m);
|
||||
}
|
||||
|
||||
static void
|
||||
rinit(Rendez *r)
|
||||
{
|
||||
pthread_mutex_lock(&initlock);
|
||||
if(r->init == 0){
|
||||
pthread_cond_init(&r->c, nil);
|
||||
r->init = 1;
|
||||
}
|
||||
pthread_mutex_unlock(&initlock);
|
||||
}
|
||||
|
||||
void
|
||||
rsleep(Rendez *r)
|
||||
{
|
||||
if(r->init == 0)
|
||||
rinit(r);
|
||||
pthread_cond_wait(&r->c, &r->l->m);
|
||||
}
|
||||
|
||||
int
|
||||
rwakeup(Rendez *r)
|
||||
{
|
||||
if(r->init == 0)
|
||||
rinit(r);
|
||||
pthread_cond_signal(&r->c);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
#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
|
||||
{
|
||||
|
@ -14,14 +10,5 @@ struct QLock
|
|||
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 */
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<$PLAN9/src/mkhdr
|
||||
<|osxvers
|
||||
|
||||
TARG=devdraw
|
||||
|
||||
|
|
Loading…
Reference in a new issue