From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Ralph Corderoy Message-ID: References: <20020116034426.F0943199EE@mail.cse.psu.edu> Subject: Re: [9fans] semaphores Date: Fri, 25 Jan 2002 10:30:03 +0000 Topicbox-Message-UUID: 45356b06-eaca-11e9-9e20-41e7f4b1d025 Hi Russ, > I figured I'd toss them out for others and to see if anyone noticed > any problems. > ... > typedef struct Sema Sema; > struct Semaphore { > QLock data; > QLock wait; > int n; > int need; > }; > > void > incsema(Sema *s, int c) > { > qlock(&s->data); Should that be `typedef struct Semaphore Sema;' in order for s->data to work? Ralph.