Join Functions

Typedefs

typedef void(* join_callback )(struct aop_joinpoint *, void *callback_param)
 Type for aop_join_on() callbacks.

Functions

void aop_join_on (struct aop_pointcut *pc, join_callback callback, void *callback_param)
void aop_join_on_copy (struct aop_pointcut *pc, int copy, join_callback callback, void *callback_param)

Typedef Documentation

typedef void(* join_callback)(struct aop_joinpoint *, void *callback_param)

Type for aop_join_on() callbacks.

The function type for callback functions to be used for iterating over a pointcut with aop_join_on().


Function Documentation

void aop_join_on ( struct aop_pointcut pc,
join_callback  callback,
void *  callback_param 
)

Iterate over the join points in a pointcut. The join calls the supplied callback once for each join point, passing the join point itself and the callback_param value.

The callback can use capture functions to get information about the join point and aop_insert_advice() to actually instrument the join point.

Join points are only valid for the lifetime of the callback. When the callback finishes, the join point is deallocated and any attempt to access it is an error.

Parameters:
pc The pointcut to iterate over.
callback The callback to call for each join point. The callback function should have a prototype that matches join_callback.
callback_param Any data you wish to pass to the callback.
Examples:
advice_header.c, duplicate.c, and hello.c.
void aop_join_on_copy ( struct aop_pointcut pc,
int  copy,
join_callback  callback,
void *  callback_param 
)

Iterate over the join points in a pointcut for a single copy of a duplicated function. Calling aop_join_on() without duplicating the function first will result in an error. Functions are duplicated with aop_duplicate().

This kind of join works just like aop_join_on(), but all join points are within one copy of the function body. It is guaranteed that advice inserted in one copy of a function body will only execute if that copy is chosen by the distributor, even for function entry and function exit join points.

Parameters:
pc The pointcut to iterate over.
copy The copy to iterate over: zero for the original copy, non-zero for the new copy.
callback The callback to call for each join point. The callback function should have a prototype that matches join_callback.
callback_param Any data you wish to pass to the callback.
Examples:
duplicate.c.
Generated on Tue Jul 31 21:46:42 2012 for InterAspect by doxygen 1.6.1