atomic io

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

 



I have seen various examples in the kernel code where
a bit is set / cleared in an output port by code like

writeb((readb(PBDDR)) & PORTB_PIN0_SDA_INPUT, PBDDR);

or 

uiRegTemp = inl(GPIO_PADDR);
outl( uiRegTemp | 0x80, GPIO_PADDR );


This code is not atomic (and in some examples I am
guessing it should be).  Are there fuctions similar to
set_bit, clear_bit, change_bit which work on I/O?  if
not what is the recomended way to do this?





		
__________________________________ 
Yahoo! Messenger 
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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