Next: cpg-ref-SP_signal, Previous: cpg-ref-SP_set_user_stream_hook, Up: cpg-bif [Contents][Index]
SP_set_user_stream_post_hook()
preinit#include <sicstus/sicstus.h> typedef SP_stream * SP_UserStreamPostHook(void *user_data, int which, SP_stream *str); SP_UserStreamPostHook * SP_set_user_stream_post_hook(SP_UserStreamPostHook *hook, void *user_data);
Sets the user-stream post-hook to hook
.
Must be called before SP_initialize()
.
The user-stream post-hook is, if defined, called after all the streams have been defined, once for each of the three standard streams. It has a slightly different prototype:
void user_stream_post_hook(void *user_data, int which, SP_stream *str)
where user_data
is the value passed to SP_set_user_stream_post_hook
and
where str
is a pointer to the corresponding SP_stream
structure. There are no requirements as to what this hook must do;
the default behavior is to do nothing at all.
The post-hook is intended to be used to do things that may require that all streams have been created.
An arbitrary pointer that will be passed to the hook
.