summaryrefslogtreecommitdiff
path: root/src/kernel/lib
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-17 13:30:09 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-17 13:30:09 +0200
commit7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef (patch)
treedf44a926f105c913c77525d35441d20a632f1440 /src/kernel/lib
parentc6d35a5f4fdda6ae2e98498f19a4adaee6d95692 (diff)
downloadTCE-7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef.tar.gz
TCE-7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef.zip
Beginning of a VFS implemented. C++ is great.
Diffstat (limited to 'src/kernel/lib')
-rw-r--r--src/kernel/lib/earray.cpp6
-rw-r--r--src/kernel/lib/earray.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/kernel/lib/earray.cpp b/src/kernel/lib/earray.cpp
index 5760822..3a41f18 100644
--- a/src/kernel/lib/earray.cpp
+++ b/src/kernel/lib/earray.cpp
@@ -1,5 +1,3 @@
-#include "earray.h"
-
#include <mem/mem.h>
#include <core/sys.h>
#include <lib/cpp.h>
@@ -101,7 +99,7 @@ T *earray<T>::at(int num) {
mutex_unlock(&mutex);
return 0;
}
- void* ret = data[i][j];
+ T* ret = data[i][j];
mutex_unlock(&mutex);
return ret;
}
@@ -145,7 +143,7 @@ void earray<T>::set(int num, T* ptr) {
}
}
} else {
- if (data[a] = 0) {
+ if (data[a] == 0) {
data[a] = (T**)kmalloc(vect_len * sizeof(T*));
for (i = 0; i < vect_len; i++) data[a][i] = 0;
}
diff --git a/src/kernel/lib/earray.h b/src/kernel/lib/earray.h
index d3d7a9b..9a43612 100644
--- a/src/kernel/lib/earray.h
+++ b/src/kernel/lib/earray.h
@@ -32,6 +32,6 @@ struct earray {
int count() { return elements; }
};
-
+#include <earray.cpp>
#endif