OrionLibC
Barry Updating libc for pipes and signals ad9b6af (3 years, 1 month ago)
#include <sys/syscall.h>
#include <errno.h>
/* Close a file */
int
pipe(int pipefd[2])
{
int *pfd = pipefd;
int ret;
asm volatile("int $0x80" : "=a" (ret) : "0" (SYSCALL_PIPE),
"c" (1), "S" (&pfd));
if (ret >= 0)
return ret;
errno = -ret;
return -1;
}