void callout_register_data( void *rp,
                            void *data );


This function lets you associate a pointer to arbitrary data with a kernel callout. This data pointer is passed to the patcher routine (see Patching the kernel callout code below).

The rp argument is a pointer to the pointer where the kernel callout address is stored in the system page you're building. For example, say you have a pointer to a system page section that you're working on called foo. In the section there's a field bar that points to a kernel callout when the system page is finished. Here's the code:

// This sets the callout in the syspage:

foo->bar = (void *)&callout_routine_name;

// This registers data to pass to the patcher when we're
// building the final version of the system page:

callout_register_data(&foo->bar, &some_interesting_data_for_patcher);

When the patcher is called to fix up the kernel callout that's pointed at by foo->bar, &some_interesting_data_for_patcher is passed to it.