MCPcopy Create free account
hub / github.com/F-Stack/f-stack / trap_user_dtrace

Function trap_user_dtrace

freebsd/i386/i386/trap.c:969–979  ·  view source on GitHub ↗

* Invoke a userspace DTrace hook. The hook pointer is cleared when no * userspace probes are enabled, so we must synchronize with DTrace to ensure * that a trapping thread is able to call the hook before it is cleared. */

Source from the content-addressed store, hash-verified

967 * that a trapping thread is able to call the hook before it is cleared.
968 */
969static bool
970trap_user_dtrace(struct trapframe *frame, int (**hookp)(struct trapframe *))
971{
972 int (*hook)(struct trapframe *);
973
974 hook = atomic_load_ptr(hookp);
975 enable_intr();
976 if (hook != NULL)
977 return ((hook)(frame) == 0);
978 return (false);
979}
980#endif
981
982/*

Callers 1

trapFunction · 0.70

Calls 1

enable_intrFunction · 0.50

Tested by

no test coverage detected