static void my_console_write( struct _console_ctrl *cc, int console, unsigned offset, unsigned char __FAR *buf, int nbytes, int row, int col, int type) { struct _mxfer_entry sx[2]; struct _mxfer_entry rx; union _console_msg { struct _console_write write; struct _console_write_reply write_reply; } msg; msg.write.type = _CONSOLE_WRITE; msg.write.handle = cc->handle; msg.write.console = console; msg.write.curs_row = row; msg.write.curs_col = col; msg.write.curs_type = type; msg.write.offset = offset; msg.write.nbytes = nbytes; _setmx( &sx[1], buf, nbytes ); _setmx( &sx[0], &msg.write, sizeof(msg.write)-sizeof(msg.write.data) ); _setmx( &rx, &msg.write_reply, sizeof( msg.write_reply ) ); Sendmx(cc->driver, 2, 1, sx, &rx ); }
_WCRTLINK int (__sendfd)( int fd, _CONST32 void _WCI86FAR *msg1, void _WCI86FAR *msg2, unsigned nbytes1, unsigned nbytes2 ) { struct _mxfer_entry xmsg1; struct _mxfer_entry xmsg2; _setmx(&xmsg1, msg1, nbytes1); _setmx(&xmsg2, msg2, nbytes2); return( __sendfdmx( fd, 1, 1, &xmsg1, &xmsg2 ) ); }
_WCRTLINK pid_t (__creceive)( pid_t pid, void _WCI86FAR *msg, unsigned nbytes ) { struct _mxfer_entry xmsg; _setmx(&xmsg, msg, nbytes); return( __creceivemx( pid, 1, &xmsg ) ); }
_WCRTLINK int (__reply)( pid_t pid, _CONST32 void _WCI86FAR *msg, unsigned nbytes ) { struct _mxfer_entry xmsg; _setmx(&xmsg, msg, nbytes); return( __replymx( pid, 1, &xmsg ) ); }
_WCRTLINK unsigned (__writemsg)( pid_t pid, unsigned offset, _CONST32 void _WCI86FAR *msg, unsigned nbytes ) { struct _mxfer_entry xmsg; _setmx(&xmsg, msg, nbytes); return( __writemsgmx( pid, offset, 1, &xmsg ) ); }