Re: [PATCH, RFC 1/3] Add sem_getcount() to arches that lack it

From: Andrew Morton
Date: Thu Mar 10 2005 - 23:59:34 EST


Jody McIntyre <scjody@xxxxxxxxxxxxxx> wrote:
>
> parisc and frv define sem_getcount() in semaphore.h, which returns the
> current semaphore value. This is cleaner than doing
> atomic_read(&semaphore.count), currently done in
> drivers/ieee1394/nodemgr.c and fs/xfs/linux-2.6/xfs_buf.c, and will work
> on all architectures if sem_getcount() is added.

That's a fairly bizarre thing to want to do. Would it be hard to modify
xfs and 1394 to stop wanting to read a semaphore's up() count?

(Why do they want to do this anyway?)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/