TFORK
Section: MINTLIB LIBRARY FUNCTIONS
(3)
Updated: 3 March 1993
Index
Return to Main Contents
NAME
tfork - start a new thread
SYNOPSIS
long tfork(int (*func)(long), long arg);
DESCRIPTION
tfork starts a new thread of execution running in the same
address space. The new thread gets its own 4K stack, and
starts at the address in func with arg on the stack, i.e.
as though the main program had a call like (*func)(arg).
The main program continues executing, with tfork returning
the process ID of the child.
If MiNT is not active, then the child runs to completion
and the return value is the child's exit status; vfork
relies on this behavior.
SEE ALSO
exec..(3),
fork(3),
vfork(3),
wait(3)
NOTES
Parent and child share the same memory; this could cause
problems with some library calls, notably malloc.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- SEE ALSO
-
- NOTES
-
This document was created by
man2html,
using the manual pages.
Time: 08:59:23 GMT, February 14, 2025