Re: [PATCH] 2.4.17 pthread support for SEM_UNDO in semop()

Christoph Hellwig (hch@ns.caldera.de)
Tue, 22 Jan 2002 21:10:14 +0100


In article <200201221834.g0MIY9s08359@eng2.beaverton.ibm.com> you wrote:
> +/* Each PROCESS (i.e. collection of tasks that are running POSIX style threads)
> + * must share the same semundo list, in order to support POSIX SEMUNDO
> + * semantics for threads. The sem_undohd controls shared access to this
> + * list among all the tasks (threads) in that process.

Just because pthreads exist the Linux notation of process doesn't
change. Could you please change that comment to talk about thread
groups?

> +/* For now, assume that if ALL clone flags are set, then
> + * we must be creating a POSIX thread, and we want undo lists
> + * to be shared among all the threads in that thread group.
> + *
> + * See the notes above unlock_semundo() regarding the spin_lock_init()
> + * in this code. Initialize the undohd->lock here instead of get_undohd()
> + * because of the reasoning in the note referenced here.
> + */
> +#define CLONE_SEMUNDO (CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND)

That's junk. Define a new CLONE_SYSVIPC flags instead of overloading a
collection (!) of old flags.

Christoph

-- 
Whip me.  Beat me.  Make me maintain AIX.
-
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/