Next | Prev | Up | Top | Contents | Index

Compilation Flags for MP TCP/IP

For IRIX 5.3, the following flag must be defined in order to enable the macros necessary to run under multi-threaded TCP/IP:

-D_MP_NETLOCKS -DMP


IFNET_LOCK(ifp, s)

Network driver interrupt handlers should call this macro to protect critical data structures against system calls that try to access the same data structures on other processors. This macro acquires the lock that is part of the driver ifnet structure pointed to by ifp. s is the return value of the processor interrupt mask. The lock is held at splimp level. The multiprocessor TCP/IP locking scheme in IRIX 5.3 automatically holds this lock when the system enters the driver via a system call. The lock is be released automatically upon returning from the driver to synchronize simultaneous accesses to the driver from multiple processors.


IFNET_UNLOCK(ifp,s)

This macro is the reverse of IFNET_LOCK, IFNET_UNLOCK is used to release the lock. s is the value previously returned by IFNET_LOCK().


IFNET_LOCKNOSPL(ifp)

This macro is similar to IFNET_LOCK but assumes that splimp has been called previously.


IFNET_UNLOCKNOSPL(ifp)

This macro is similar to IFNET_UNLOCK but does not lower the spl.


IFQ_LOCK/UNLOCK(ifq)

This macro acquires/releases the lock, which is part of the input queue.


IF_ENQUEUE(ifq, m)

This macro acquires the lock on ifq and appends the packet pointed to by the mbuf m. The lock is released upon return.


Next | Prev | Up | Top | Contents | Index