next up previous contents
Next: Multi-processing Up: Advanced programming techniques Previous: Receiving signals

Time sharing

It is sometimes necessary for the device server to only serve the network i.e. commands coming from clients, only a part of its time. Instead of spending all its time in a wait loop waiting for commands it is possible for the device server to poll the network at regular intervals to see if there are any commands to be executed. The call which allows this is ds__svcrun().

The calling syntax is -

long ds__svcrun (long *error);
ds__svcrun will check all open sockets to see if there are any commands waiting to be executed and will then execute the next command. If there are no commands waiting the function will timeout after 10 ms (1 sec for OS9 !).



Andy Goetz
Tue Jan 28 13:58:13 MET 1997