summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-01-28 23:28:48 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-01-28 23:28:48 +0100
commit3f7ad298fd5dd80c0dc017fdd77be23e7861e547 (patch)
treebed3a33609f64e6977675de2ebb73aad9790228e /kern
parent3496138ca428a7b2b69fe08e69fb544006a9a2cc (diff)
parenta12a10679017d89194c0dd873f44804b64f71102 (diff)
Merge branch 'master' into master-slab
Diffstat (limited to 'kern')
-rw-r--r--kern/sched_prim.c2
-rw-r--r--kern/strings.c19
2 files changed, 20 insertions, 1 deletions
diff --git a/kern/sched_prim.c b/kern/sched_prim.c
index ff942ae..9d4e8af 100644
--- a/kern/sched_prim.c
+++ b/kern/sched_prim.c
@@ -139,7 +139,7 @@ void thread_check(thread_t, run_queue_t);
* The wait event hash table declarations are as follows:
*/
-#define NUMQUEUES 59
+#define NUMQUEUES 1031
queue_head_t wait_queue[NUMQUEUES];
decl_simple_lock_data(, wait_lock[NUMQUEUES])
diff --git a/kern/strings.c b/kern/strings.c
index 80e410e..3676f98 100644
--- a/kern/strings.c
+++ b/kern/strings.c
@@ -172,3 +172,22 @@ strlen(
return string - 1 - ret;
}
+
+/*
+ * Abstract:
+ * memset writes value "c" in the "n" bytes starting at address "s".
+ * The return value is a pointer to the "s" string.
+ */
+
+void *
+memset(
+ void *_s, int c, size_t n)
+{
+ char *s = _s;
+ int i;
+
+ for (i = 0; i < n ; i++)
+ s[i] = c;
+
+ return _s;
+}