AsyncIbcnt and AsyncIbcntl

Name

AsyncIbcnt and AsyncIbcntl -- ibcnt and ibcntl values for last asynchronous I/O operation

Synopsis

#include <gpib/ib.h>

int AsyncIbcnt(void);

long AsyncIbcntl(void);

Description

AsyncIbcnt() and AsyncIbcntl() return thread-local counts related to the global variables ibcnt and ibcntl. Their values correspond to the result of the last asynchronous I/O operation resynchronized to the current thread by an ibwait or ibstop call. These functions only reflect the result of the asynchronous I/O operation itself and not, for example, the ibwait which resynchronized the asynchronous result to the current thread. Thus the result from AsyncIbcnt() is easier to interpret than ThreadIbcnt(), since it is unambiguous whether the value is associated with the asynchronous I/O result, or with the function call used to resynchronize (ibwait or ibstop).

These functions are Linux-GPIB extensions.

Return value

A value related to ibcnt or ibcntl corresponding to the last asynchronous I/O operation resynchronized to the current thread is returned.