Doubts about PICKUP_GIANT() and mtx_lock(&Giant).

Pranav Peshwe pranavpeshwe at
Sun Mar 12 10:55:09 UTC 2006

          What is effectively the difference between PICKUP/DROP_GIANT and
mtx_lock/unlock(&Giant)  ? From the macro expansion, i surmise that
PICKUP/DROP_GIANT deals with recursion in Giant locking.Is this correct ? is
this the only difference ? What will happen if i mix the usage of
PICKUP/DROP_GIANT and mtx_lock/unlock(&Giant) ?
Also,is there any hard and fast rule prescribing which method of taking the
Giant should be used where in the kernel ?



To argue with a person who has renounced the use of reason is like
administering medicine to the dead. -- Thomas Paine

More information about the freebsd-hackers mailing list