|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3072 (0xc00) Types: TextFile Names: »xpoolenv«
└─⟦a41ae585a⟧ Bits:30001842 SW-save af projekt 1000, Alarm-system └─⟦72244f0ef⟧ └─⟦this⟧ »xpoolenv«
xpoolenv; (*************************************************) (* *) (* external pool handler environments *) (* *) (*************************************************) const (* functions u1 *) request_buf=1; (* request buffer *) deliver_buf=(1*4)+2; (* deliver buffer for administration *) remove_buf=(2*4)+0; (* remove buffers *) (* parameters placed in u3 in req_buf *) infinite_wait=4*63; (* wait infinite for a buffer *) no_wait=0; (* wait with timer=0 for a buffer *) (* results u2 *) ok=0; (* buffer returned - the u fields of the buffer itself are: u1=?*4+2, u2=<>7. *) no_buffers=5; (* if no buffers and timer=0 *) illegal=4; (* illegal function or u3 specified *) type stat=record req, (* total no of requests *) wreq, (* waiting requests *) mwreq, (* max waiting requests *) twreq, (* total no of waits *) tmout: integer; (* no of timeouts *) end; bst=record buf, (* total no of buffers *) freebuf, (* no of free buffers *) maxfree, (* max no of free buffers *) minfree: integer; (* min no of free buffers *) end; prelement=record st:stat; sem: semaphore; end; prtable=array(0..3) of prelement; prsttype=array(0..3) of stat; pst=record stb:bst; st:stat; end; stat_update=(req_to_wait,get_buf,time_out,buf_to_wait,get_req); ph_type=record key:semaphore; (* semaphore to protect ph *) buffer_sem:semaphore; bpool:pst; prio:prtable; end; (**********************************************) (* procedure declarations *) (**********************************************) procedure deliv_buf (var ref: reference; var ph_sem: semaphore); external; procedure req_buf (var ref: reference; var ph_sem: semaphore; u3, u4: byte); external; procedure remov_buf(var ref: reference;var ph_sem: semaphore; number,u4:byte); external; procedure request_buffer(var ref:reference; var ph:ph_type; priority: 0..3); external; procedure return_buffer(var ref:reference; var ph:ph_type); external; procedure update_stat(priority:0..3; statistics:stat_update; var ph:ph_type); external; procedure remove_buffers(var ph:ph_type;count:integer); external; procedure deliver_buffer(var ref: reference; var ph:ph_type); external; procedure init_ph(var ph:ph_type; var lockpool: pool 1); external; (**********************************************) (* *) (* end external pool handler environments *) (**********************************************) . ▶EOF◀