Re: Bug in set/gethostname.

Peter T. Breuer (ptb@it.uc3m.es)
Mon, 18 May 1998 01:24:05 +0200 (MET DST)


"A month of sundays ago Peter T. Breuer wrote:"
>
> "A month of sundays ago Michael Elizabeth Chastain wrote:"
> > will return either the old name or the new name, but not some mongrel
> > mixture of the two.
>
> You don't need to acquire a semaphore on read, do you? Surely only on
> write? It doesn't matter if two people read the same data
> simultaneously, so long as no two people write it simultaneously ...

Gah. wups. Yes, of course you need a n readers/1 writer guarantee.
A semaphore for both reading and writing does that, even if it is too
tight a restriction.

Peter ptb@it.uc3m.es

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu