From: Russell King <rmk@arm.linux.org.uk>
To: linux-kernel@vger.kernel.org
Subject: Dereferencing semaphores and atomic_t's
Date: Wed, 2 Oct 2002 11:16:26 +0100 [thread overview]
Message-ID: <20021002111625.B24770@flint.arm.linux.org.uk> (raw)
drivers/scsi/scsi_error.c:
SCSI_LOG_ERROR_RECOVERY(3, printk("Wake up parent %d\n",
shost->eh_notify->count.counter));
up(shost->eh_notify);
drivers/scsi/hosts.c:
up(shost->eh_wait);
SCSI_LOG_ERROR_RECOVERY(5, printk("Waking error handler"
"thread (%d)\n",
atomic_read(&shost->eh_wait->count)));
up(shost->eh_wait);
SCSI_LOG_ERROR_RECOVERY(5, printk("Waking error handler"
"thread (%d)\n",
atomic_read(&shost->eh_wait->count)));
Do we really allow this type of layering violation?
(There appear to be some circumstances when obtaining the semaphore count is
useful, but shouldn't we provide an architecture helper function to do that
since a semaphore structure _is_ an architecture-defined opaque structure.)
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next reply other threads:[~2002-10-02 10:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-02 10:16 Russell King [this message]
2002-10-02 10:32 ` Dereferencing semaphores and atomic_t's David S. Miller
2002-10-02 13:21 ` Alan Cox
2002-10-02 16:46 ` Mike Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021002111625.B24770@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.