This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_pthread_create

Function Documentation

int rc_pthread_create(pthread_t *thread, void *(*func)(void*), void *arg, int policy, int priority)

starts a pthread with specified policy and priority

Note that using anything other than SCHED_OTHER with priority 0 is only available to root users or after giving special permission to the executable with the setcap command line utility.

If a policy is selected which requires privaldges the user does not have, then a friendly warning will be displayed and the thread will still be set with the priority and scheduler inherited from the calling process.

Parameters
  • thread – pointer to user’s pthread_t handle

  • func – function pointer for thread to start

  • arg – argument to pass to thread function when it starts

  • policy[in] SCHED_FIFO SCHED_RR or SCHED_OTHER

  • priority[in] between 1-99 for FIFO and RR, defualt 0 for SCHED_OTHER

Returns

0 on success or -1 on error