lkml.org 
[lkml]   [2001]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Use semaphore for producer/consumer case...
On Fri, Mar 23, 2001 at 07:34:07PM +0100, Manfred Spraul wrote:
> > consumer()
>
> > /* Let's wait for 10 items */
> > atomic_set(&sem->count, -10);
>
> That doesn't work, at least the i386 semaphore implementation doesn't
> support semaphore counts < 0.

Does that mean that kernel semaphore can not be used for something
else than mutual exclusion ?

Stelian.
--
Stelian Pop <stelian.pop@fr.alcove.com>
|------------- Ingénieur Informatique Libre --------------|
| Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|----------- Alcôve, l'informatique est libre ------------|
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.099 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site