allocates are server for private use
INCLUDE 'sysman.h'
alloc_server(ServerID)
alloc_server(ServerID) (i) (o)
server(ServerID) Process ID of the allocated server.
Allocates a server from the public server pool for private used. ServerID may be partially
initalized, e.g. to get a server on a certain note. The server should be returned with the
free_server
() predicate if no longer needed.
NOTE: If you pass the ID to the
exec
() or
xcall
() predicates, it will be return automatically after use.
get_my_id(MyID), alloc_server(ID), exec(ID,send_msg(MyID,done)), rec_msg(ID,Result), write(Result),nl,
No runtime errors. If a server is to be allocated, the process might suspend if no
server is available.
This may cause deadlocks!
client-server
dcall , exec , xcall , claim_processes , create_processes