Re: dumping a liked list with seq_operations

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

 



On Fri, Feb 03, 2006 at 10:50:38AM -0800, Krnl Newbee wrote:
> Hi
> 
> I have a question regarding seq_operations. Say, I
> have a big linked list or some data structure that I
> want to show with /proc interface. Since I don't want
> the list to be modified while I walk, I take a
> semaphore and start showing the list with, seq_open,
> seq_next, seq_show calls. Say I'm showing this linked
> list when user calls 'ls' on /proc/showlinkedlist.
> What if a user presses Ctrl-S and pauses the output of

Please read the Linux Device Drivers book, online if necessary. When
you are called you will be given a buffer to write your data into.
No-one will interrupt you then. When you're done you return. The caller
will take care of returning the data the user is actually interested
and dealing with blocking semantics...
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux