From 08c39320a46ad94fba9ba3310444f136dd9258f5 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 22 Aug 2011 03:03:27 +0200 Subject: libthread: reimplemented i/o procs using new interrupt ctl message --- sys/src/libthread/threadimpl.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'sys/src/libthread/threadimpl.h') diff --git a/sys/src/libthread/threadimpl.h b/sys/src/libthread/threadimpl.h index c5f7c0f2e..c34c61901 100644 --- a/sys/src/libthread/threadimpl.h +++ b/sys/src/libthread/threadimpl.h @@ -25,6 +25,7 @@ typedef struct Tqueue Tqueue; typedef struct Thread Thread; typedef struct Execargs Execargs; typedef struct Proc Proc; +typedef struct Iocall Iocall; /* must match list in sched.c */ typedef enum @@ -135,7 +136,8 @@ struct Proc char threadint; /* tag for threadexitsall() */ }; -struct Pqueue { /* Proc queue */ +struct Pqueue /* Proc queue */ +{ Lock lock; Proc *head; Proc **tail; @@ -143,14 +145,18 @@ struct Pqueue { /* Proc queue */ struct Ioproc { - int tid; - Channel *c, *creply; - int inuse; - long (*op)(va_list*); - va_list arg; - long ret; - char err[ERRMAX]; - Ioproc *next; + QLock; + int intr; + int ctl; + Channel *c, *creply; +}; + +struct Iocall +{ + long (*op)(va_list*); + va_list arg; + long ret; + char err[ERRMAX]; }; void _freeproc(Proc*); -- cgit v1.2.3