linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dhylands@gmail.com (Dave Hylands)
To: linux-arm-kernel@lists.infradead.org
Subject: Problems with semaphores, mutexes, and atomic?
Date: Mon, 20 Jun 2011 00:44:16 -0700	[thread overview]
Message-ID: <BANLkTimwzhucvub7ZXymxt2H5xVq=MYPvw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimDcPWOwEMxdZdPyJdYx7KLGZn2wg@mail.gmail.com>

Hi Saeed,

On Mon, Jun 20, 2011 at 12:20 AM, saeed bishara <saeed.bishara@gmail.com> wrote:
> On Mon, Jun 20, 2011 at 9:39 AM, Dave Hylands <dhylands@gmail.com> wrote:
>> Hi,
>>
>> I wrote a small test module to test semaphores, mutexes and atomic
>> increments, and I've tested it with CONFIG_SMP=y with 1 and 2
>> processors and with CONFIG_SMP disabled.
>>
>> My test code can be found here:
>> http://svn.hylands.org/linux/test-mutex/test-mutex.c
>> (it's about 133 lines long).
> yout code is not complete, the DEFINE_SEMAPHORE and DEFINE_SEMAPHORE
> definitions are missing

I don't follow. Line 7 & 8 has

DEFINE_MUTEX( lock );
DEFINE_SEMAPHORE( sem_lock );

and line 19 has

DEFINE_SEMAPHORE( thread_wait );

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

  reply	other threads:[~2011-06-20  7:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20  6:39 Problems with semaphores, mutexes, and atomic? Dave Hylands
2011-06-20  7:20 ` saeed bishara
2011-06-20  7:44   ` Dave Hylands [this message]
2011-06-20  8:03     ` Arnd Bergmann
2011-06-20  8:21       ` Dave Hylands
2011-06-20  8:34         ` Arnd Bergmann
2011-06-20  9:07           ` Dave Hylands
2011-06-20  8:27 ` Russell King - ARM Linux
2011-06-20  8:58   ` Dave Hylands
2013-07-16  7:11 ` Hesham Mahmoud

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='BANLkTimwzhucvub7ZXymxt2H5xVq=MYPvw@mail.gmail.com' \
    --to=dhylands@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).