From: Jarek Poplawski <jarkao2@o2.pl>
To: davids@webmaster.com
Cc: larry.finger@lwfinger.net, LKML <linux-kernel@vger.kernel.org>
Subject: Re: Question regarding mutex locking
Date: Thu, 29 Nov 2007 08:56:15 +0100 [thread overview]
Message-ID: <20071129075615.GA9962@ff.dom.local> (raw)
In-Reply-To: <MDEHLPKNGKAHNMBLJOLKEEBHIIAC.davids@webmaster.com>
On 29-11-2007 03:34, David Schwartz wrote:
>> Thanks for the help. Someday, I hope to understand this stuff.
>>
>> Larry
>
> Any code either deals with an object or it doesn't. If it doesn't deal with
> that object, it should not be acquiring locks on that object. If it does
> deal with that object, it must know the internal details of that object,
> including when and whether locks are held, or it cannot deal with that
> object sanely.
...
Maybe it'll unnecessarily complicate the thing, but since you repeat
the need to know the object - sometimes the locking is done to
synchronize something in time only, so to assure only one action is
done at a time or a few actions are done in proper order, or/and
shouldn't be broken in the meantime by other actions (so, no need
to deal with any common data).
But, of course, we can say an action could be a kind of object too.
Regards,
Jarek P.
next prev parent reply other threads:[~2007-11-29 7:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.C9TdvYAhY8SablNc39IpD8WDnNM@ifi.uio.no>
2007-11-28 4:53 ` Question regarding mutex locking Robert Hancock
2007-11-28 5:19 ` Larry Finger
2007-11-29 2:34 ` David Schwartz
2007-11-29 7:56 ` Jarek Poplawski [this message]
2007-11-28 4:37 Larry Finger
2007-11-28 8:10 ` Matthias Kaehlcke
2007-11-28 14:46 ` Larry Finger
2007-11-28 15:00 ` Matthias Kaehlcke
2007-11-28 15:22 ` Andreas Schwab
2007-11-28 15:41 ` Larry Finger
2007-11-28 22:45 ` Jarek Poplawski
2007-11-28 22:56 ` Jarek Poplawski
2007-11-28 23:07 ` Jarek Poplawski
2007-11-28 23:33 ` Stephen Hemminger
2007-11-29 6:40 ` Jarek Poplawski
2007-11-30 1:13 ` Bryan O'Sullivan
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=20071129075615.GA9962@ff.dom.local \
--to=jarkao2@o2.pl \
--cc=davids@webmaster.com \
--cc=larry.finger@lwfinger.net \
--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.