ft_thread_get_value(1)

NAME
ft_thread_get_value - get the nth value associated to a generated event

  SYNOPSIS

#include <fthread.h>
int ft_thread_get_value (ft_event_t evt,int n,void **result);

  DESCRIPTION
ft_thread_get_value returns the nth value associated during the current instant to the event evt through calls of ft_event_generate_value or ft_scheduler_broadcast_value. If such a value exists, ft_thread_get_value sets result with a reference to it and terminates immediately (that is, during the current instant). Otherwise, it terminates at the next instant (returning NEXT) and result is then set to NULL.

  RETURN VALUES
On success, the value 0 is returned (during the current instant). Otherwise, a non-zero error code is returned.

  ERRORS

    BADCREATE
        The event evt is not correctly created.

    BADLINK
        Either the calling thread is unlinked, or the scheduler of the calling thread and the one of evt are different.

    NEXT
        Less than n values where actually associated to generations of evt during the previous instant.

  SEE ALSO
ft_thread_generate_value (3), ft_scheduler_broadcast_value (3).

AUTHOR