Sun Java System Web Server 7.0 Update 4 NSAPI Developer's Guide

systhread_start() Function

The systhread_start function creates a thread with the given priority, allocates a stack of a specified number of bytes, and calls a specified function with a specified argument.

Syntax

SYS_THREAD systhread_start(int prio, int stksz, void (*fn)(void *), void *arg);

Return Values

A new SYS_THREAD pointer if the call succeeds, or the constant SYS_THREAD_ERROR if the call does not succeed.

Parameters

int prio is the priority of the thread. Priorities are system-dependent.

int stksz is the stack size in bytes. If stksz is zero (0), the function allocates a default size.

void (*fn)(void *) is the function to call.

void *arg is the argument for the fn function.

See Also

systhread_current() Function, systhread_getdata() Function, systhread_newkey() Function, systhread_setdata() Function, systhread_sleep() Function, systhread_timerset() Function