*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> taskcreate (3p)              
Title
Content
Arch
Section
 

Contents


TASKCREATE(3P)							TASKCREATE(3P)


NAME    [Toc]    [Back]

     taskcreate	- create a new task

C SYNOPSIS    [Toc]    [Back]

     #include <task.h>

     tid_t taskcreate (char *name, void	(*entry)(), void *arg,
		       int sched);

DESCRIPTION    [Toc]    [Back]

     Taskcreate	causes a new task to be	created	for the	calling	process/task.
     The new task is created via the sproc(2) system call, requesting that all
     attributes	(e.g. open files, current directory, uid, etc.)	be shared.

     The new task differs from the calling task	as described in	sproc(2).

     The new task will be invoked as follows:
	       entry(arg)
	       void *arg;

     The sched parameter is currently unused and should	be set to 0.

     No	implicit synchronization is implied between tasks - they are free to
     run on any	processor in any sequence.  Synchronization must be provided
     by	the application	using locks and	semaphores (see	usinit(3P)).

     Each created task has a task block	allocated.  The	task blocks are	linked
     together and pointed to by	taskheader. The	task block structure is
     defined in	task.h.

     Taskcreate	will fail and no new task will be created if one or more of
     the following are true:

     The sproc(2) system call fails.

     [ENOMEM]	    The	required memory	for the	task block or task name	was
		    not	available.

SEE ALSO    [Toc]    [Back]

      
      
     sproc(2), taskblock(3P), taskctl(3P), taskdestroy(3P).

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, taskcreate returns the	task id	of the new
     task.  The	task id	is guaranteed to be the	smallest available.
     Otherwise,	a value	of -1 is returned to the calling task, and errno is
     set to indicate the error.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
taskdestroy IRIX destroy a task
taskctl IRIX operations on a task
TASKQUEUE_DEFINE FreeBSD asynchronous task execution
TASK_INIT FreeBSD asynchronous task execution
taskqueue_enqueue FreeBSD asynchronous task execution
taskqueue_find FreeBSD asynchronous task execution
taskqueue_free FreeBSD asynchronous task execution
taskqueue_create FreeBSD asynchronous task execution
taskqueue FreeBSD asynchronous task execution
taskqueue_run FreeBSD asynchronous task execution
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service