Changeset 641:69d3579f6c6c in freeDiameter for doc/dbg_interactive.py.sample
- Timestamp:
- Dec 21, 2010, 10:29:46 AM (13 years ago)
- Branch:
- default
- Phase:
- public
- Tags:
- 1.0.3-rc3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/dbg_interactive.py.sample
r640 r641 648 648 649 649 # Get the list of peers defined in the system 650 # (well, we are supposed actually to readlock fd_g_peers_rw before doing this, but it should be fine most of the time) 650 # (we are supposed to readlock fd_g_peers_rw before accessing this list) 651 cvar.fd_g_peers_rw.rdlock() 651 652 peers = cvar.fd_g_peers.enum_as("struct peer_hdr *") 653 cvar.fd_g_peers_rw.unlock() 652 654 for p in peers: 653 655 print "Peer:", p.info.pi_diamid … … 727 729 728 730 731 732 ############# POSIX functions wrappers ############ 733 734 # The interface also provides wrappers around base POSIX 735 # synchronization functions: 736 737 m = pthread_mutex_t() 738 m.lock() 739 m.unlock() 740 741 c = pthread_cond_t() 742 c.signal() 743 c.broadcast() 744 c.wait(m) 745 c.timedwait(m, 5) # it takes a relative time 746 747 r = pthread_rwlock_t() 748 r.rdlock() 749 r.unlock() 750 r.wrlock()
Note: See TracChangeset
for help on using the changeset viewer.