ft_scheduler_create,(1)

NAME
ft_scheduler_create, ft_scheduler_start - create and start a new scheduler

  SYNOPSIS

#include <fthread.h>
ft_scheduler_t ft_scheduler_create (void);
int ft_scheduler_start (ft_scheduler_t sched);

  DESCRIPTION
ft_scheduler_create returns a new scheduler that will run the threads created in it, using ft_thread_create. The new scheduler sched starts running when the function ft_scheduler_start is called.

  RETURN VALUES
On success ft_scheduler_create returns the new scheduler; NULL is returned otherwise. On success the value 0 is returned by ft_scheduler_start and a non-zero error code is returned otherwise.

  ERRORS

    NULL
        The scheduler cannot be created.

    BADCREATE
        The scheduler sched is not correctly created when started.

  SEE ALSO
ft_thread_create (3).

AUTHOR