-%
-% (c) The GRASP/AQUA Project, Glasgow University, 1994
-%
-\subsection[getLock.lc]{stdin/stout/stderr Runtime Support}
-
-\begin{code}
-
-#include "rtsdefs.h"
+/*
+ * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
+ *
+ * $Id: getLock.c,v 1.1 1998/04/10 10:54:39 simonm Exp $
+ *
+ * stdin/stout/stderr Runtime Support
+ */
+
+#include "Rts.h"
#include "stgio.h"
#ifdef HAVE_SYS_TYPES_H
static int writeLocks = 0;
int
-lockFile(fd, exclusive)
-int fd;
-int exclusive;
+lockFile(int fd, int exclusive)
{
int i;
struct stat sb;
}
int
-unlockFile(fd)
-int fd;
+unlockFile(int fd)
{
int i, rc;
}
StgInt
-getLock(fp, exclusive)
-StgForeignObj fp;
-StgInt exclusive;
+getLock(StgAddr fp, StgInt exclusive)
{
if (lockFile(fileno((FILE *) fp), exclusive) < 0) {
if (errno == EBADF)
return 1;
}
-\end{code}