summaryrefslogtreecommitdiff
path: root/ulib.c
diff options
context:
space:
mode:
authorrtm <rtm>2006-08-12 11:38:57 +0000
committerrtm <rtm>2006-08-12 11:38:57 +0000
commit4357207237e074b5a42ee9739eadd040fd1cf296 (patch)
tree1fe657b94bdfb412c02c6c4cec089f329d69df96 /ulib.c
parent1f544842ceb5af73b1f2b13222d72dd4ad7cd08a (diff)
downloadxv6-labs-4357207237e074b5a42ee9739eadd040fd1cf296.tar.gz
xv6-labs-4357207237e074b5a42ee9739eadd040fd1cf296.tar.bz2
xv6-labs-4357207237e074b5a42ee9739eadd040fd1cf296.zip
fix getblk to actually lock the block
no more cons_put system calls usertests tests two processes writing files
Diffstat (limited to 'ulib.c')
-rw-r--r--ulib.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ulib.c b/ulib.c
index ccb9fd6..b759f45 100644
--- a/ulib.c
+++ b/ulib.c
@@ -26,6 +26,17 @@ strlen(char *s)
return n;
}
+void *
+memset(void *dst, int c, unsigned int n)
+{
+ char *d = (char *) dst;
+
+ while(n-- > 0)
+ *d++ = c;
+
+ return dst;
+}
+
char *
gets(char *buf, int max)
{