Mutexing

Just as with io-net drivers, io-pkt drivers can choose to implement a variety of hardware and data exclusive-access mechanisms. We have mentioned that before the driver transmit *_start() function is called, an io-pkt mutex will be locked, and must be freed before the function returns.

However, we recommend that each io-pkt driver provide its own mutex protection to its hardware and data structures, to ensure that it functions correctly on SMP machines, and even if someone rearranges thread priorities, or even recodes io-pkt's threading model in the future.

It should be obvious that mutex protection is required for the transmit and receive calls. However please be careful to ensure that adequate mutexing is also implemented for the housekeeping periodic timer and also the ioctl() calls, which may access hardware and alter driver data structure values.