Messages in this thread | | | Date | Mon, 21 Oct 2002 20:36:24 +0100 (BST) | From | Hugh Dickins <> | Subject | Re: [PATCH]IPC locks breaking down with RCU |
| |
On Tue, 22 Oct 2002, Dipankar Sarma wrote: > > I took a quick look at the original ipc code and I don't understand > something - it seems to me the ipc_ids structs are protected by the semaphore > inside for all operations, so why do we need the spinlock in the > first place ? Am I missing something here ?
I made that mistake too at first, Mingming set me straight. Many of the entry points down() the ipc_ids.sem semaphore, but the most significant ones do not. ipc/sem.c is probably the best example (if confusing, since it involves quite different meanings of semaphore): sys_semop() is the frequent, fast entry point, uses sem_lock without down.
Hugh
- 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/
| |