lkml.org 
[lkml]   [1999]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectQuery about Atomic operation..
On Mon, 22 Mar 1999, Prasanna Gokhale wrote:

>
> Hello,
> I am running a piece of driver code in kernel space on a
> uni-processor system.
> How can I protect my global data structures from simultaneous
> access by multiple processes.???
> I found some functions like set_bit(), clear_bit() etc in the
> kernel code.
> Do the usage of these functions solve the problem ?
> The set_bit() etc function implementation does not seem to
> take into consideration about multiple processes.
>
> What if multiple processes try to call set_bit() at the same time.?
> Do both of them get access to the bit.?
> What care to be taken for this?
> Should I use cli(), sti() also ????
>
> - Thanx in advance
> - Prasanna Gokhale
>
>
> --------------------------------------------------------------
> Prasanna Gokhale Phone No:91-80-8410221
> Tata Elxsi India Ltd. email : pras@teil.soft.net
> Whitefield Road,Hoody,
> Mahadevapura Post
> Bangalore - 560048
> India
> ----------------------------------------------------------------
>
>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.449 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site