在Linux和Unix系统中进行线程安全的I/O操作
发布时间
阅读量:
阅读量
信号安全IO软件包
/************************************************************* * The Sio (Signal-safe I/O) package - simple reentrant output
* functions that are safe for signal handlers.
*************************************************************/
/* Private sio functions */
/* $begin sioprivate */
/* sio_reverse - Reverse a string (from K&R) */
static void sio_reverse(char s[])
{
int c, i, j;
for (i = 0, j = strlen(s)-1; i < j; i++, j--) {
c = s[i];
s[i] = s[j];
s[j] = c;
全部评论 (0)
还没有任何评论哟~
