Tsleep. Microware C Compiler
Advertisement
Advertisement
Chapter 3. C System Calls
Synopsis
_strass
(char *s1, char *s2, int count);
Description
Until such time as the compiler can deal with structure assignment, this function is useful for copying one structure to another.
"Count" bytes are copied from memory location at "s2" to memory as "s1" regardless of the contents.
Tsleep
Name
Tsleep
— put process to sleep
Synopsis
tsleep
(int ticks);
Assembler Equivalent
os9 F$SLEEP
Description
Tsleep deactivates the calling process for a specified number of system "ticks" or indefinitely if "ticks" is zero. A tick is system dependent but is usually 100ms.
For a fuller description of this call, see the OS-9 System Programmer’s Manual.
Unlink
Name
Unlink
— remove directory entry
Synopsis
unlink
(char *fname);
40
Chapter 3. C System Calls
Assembler Equivalent
os9 I$DELETE
Description
Unlink deletes the directory entry whose name is pointed to by "fname". If the entry was the last link to the file, the file itself is deleted and the disc space occupied made available for re-use. If, however the file is open, in any active task, the deletion of the actual file is delayed until the file is closed.
Diagnostics
Zero is returned from a successful call, -1 if the file does not exist, if its directory is write-protected, or cannot be searched, if the file is a non-empty directory or a device.
See Also
OS-9 command "kill"
Wait
Name
Wait
— wait for task termination
Synopsis
wait
(int *status); wait
(0);
Assembler Equivalent
os9 F$WAIT
Description
Wait is used to halt the current task until a child task has terminated.
The call returns the task id of the terminating task and places the status of that task in the integer pointed to by "status" unless "status" is 0. A wait must be executed for each child task spawned.
The status will contain the argument of the "exit" or "_exit" call in the child task of the signal number if it was interrupted. A normally terminating C program with no call to "exit" or "_exit" has an implied call of "exit(0)".
41
Download
Advertisement