Bulletin number: 31 Products affected: D711D Description: Very long timeouts on chan-in-*-t routines Component: crtl.lib Date: Wed Mar 14 10:29:45 GMT 1990 ----- The mechanism used for input timeouts in Parallel C is slightly strange. This is my explanation of it. The input transfer is initiated and the process waits. The wait time is about one eighth of the timeout value. The transfer is then checked for completion. If complete the routine returns. If not, another one eighth of the timeout value is waited. This means that the time to transfer data is more dependant on the timeout value than on the quantity of data to be input. 3L have supplied a floppy disk which contains an "experimental" version of the affected routines. The library was provided on the understanding that it will not be put on general release but will only be provided to customers who have a specific need for it. Each office will receive a copy shortly. The following is the READ.ME file provided with the disk. ---------------------------------------------------------------------- CHANTIME.BIN Replacement timeout functions for Parallel C V2.0 This disk holds a file CHANTIME.BIN which contains T4 and T8 versions of an experimental revision of the "timeout" channel functions for Parallel C. The revised functions behave in the same way to the originals when the communication times out, but may return with much less delay when the communication is successful. The package also includes a function which can be used to vary the behaviour of these functions to tune them to different applications. The provision of the functions in this way does not guarantee that a future version of Parallel C will include functions with this specification. The "timeout" channel functions included in this library are as follows: chan_in_byte_tx chan_out_byte_tx chan_in_word_tx chan_out_word_tx chan_in_message_tx chan_out_message_tx The names of the revised functions are thus identical to the standard functions included with Parallel C, with a lower-case letter 'x' added. The argument and result types for the functions are the same as for the originals. In addition, the CHANTIME.BIN library includes an additional function, described as follows: void chan_t_granularity(i) int i; This sets the maximum time (in ticks of the current priority processor clock) between a communication completing and the timeout function returning. The default value for this "granularity" is 100 ticks (about 7ms at low priority, 100us at high priority). The behaviour of the revised functions can be made identical to those of the original functions supplied with Parallel C V2.0 by calling chan_t_granularity with a value of 0x7FFFFFFF (the maximum positive integer). The functions then revert to a granularity of one eighth of the specified timeout value.