dumping a liked list with seq_operations

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

 



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


ls /proc/showlinkedlist

Since my seq operations hasn't reached end or called
seq_stop, where I intend to release the semaphore,
does it mean that I can't modify the list till user
process Ctrl-Q and is done with 'ls'?

Please help me understand this.

Appreciate your help.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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