Re: Reader/writer semaphores

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 2, 2008 at 11:52 PM, bhanu nani <bhanu.lnxnew@xxxxxxxxx> wrote:
> Hi Fabio,
>
>  My understanding: Semaphore are the tools to protect a region of code
>  by bloking access to other threads access while the first thead is

An important point to note here is that you are not protecting the
code, its the data structure
or variable you are protecting.

>   global x;
>   up
>      /* critical section - any thing*/
>      *fpos+=count;
>      mystruct->size = *fpos;
>      mystruct->xxx = *fpos+ count;
>   down
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux