Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ preset(2) — Purdue Xinu

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pcount(2)

pcreate(2)

pdelete(2)

preceive(2)

psend(2)

PRESET(2)

NAME

preset  − reset a port

SYNOPSIS

int preset(portid, dispose)
int portid;
int (∗dispose)();

DESCRIPTION

Preset flushes all messages from a port and releases all processes waiting to send or receive messages.  Preset returns SYSERR if portid is not a valid port id. 

Preset has several effects, depending on the state of the port at the time the call is issued.  If processes are blocked waiting to receive messages from port portid, they are all made ready; each returns SYSERR to caller.  If messages are in the port they are disposed of by passing them to function dispose. If process are blocked waiting to send messages they are made ready; each returns SYSERR to its caller (as though the port never existed).

The effects of preset are the same as PDELETE(2) followed by PCREATE(2), except that the port is not deallocated.  The maximum message count remains the same as it was. 

BUGS

There is no way to change the maximum message count when the port is reset. 

SEE ALSO

pcount(2), pcreate(2), pdelete(2), preceive(2), psend(2)

December 01, 1986  —  Xinu Programmer’s Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026