|
|
1.1 ! root 1: ddeeffeerr() -- Accessible Kernel Routine ! 2: ! 3: vvooiidd ! 4: ddeeffeerr(_f_u_n_c, _a_r_g) ! 5: vvooiidd (*_f_u_n_c)(); ! 6: cchhaarr *_a_r_g; ! 7: ! 8: ddeeffeerr() defers execution of function _f_u_n_c with argument _a_r_g. Execution of ! 9: _f_u_n_c remains deferred until the next context switch, transition from kernel ! 10: to user mode, or invocation of the function ddeeffeenndd. ! 11: ! 12: Deferred functions should never call sleep or access the uu area, because ! 13: the kernel can switch uu areas as part of context switching. Up to 127 ! 14: functions can be deferred at any one time. Exceeding this limit may lose ! 15: all deferred functions. ! 16: ! 17: ddeeffeerr() is normally used to minimize interrupt latency by deferring ! 18: operations from interrupt level, where lower priority interrupts are ! 19: disabled, to background level, where all interrupts are normally enabled. ! 20: It is also useful in eliminating critical race conditions between task- and ! 21: interrupt-related operations, because deferred functions execute ! 22: synchronously with each other, with timed functions, and with system calls. ! 23: ! 24: _S_e_e _A_l_s_o ! 25: aacccceessssiibbllee kkeerrnneell rroouuttiinneess
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.