Even more reorganizing
authorcoderain <coderain@sdf.org>
Sat, 7 Oct 2017 06:12:45 +0000 (08:12 +0200)
committercoderain <coderain@sdf.org>
Sat, 7 Oct 2017 06:12:45 +0000 (08:12 +0200)
12 files changed:
kernel/include/device.h
kernel/include/filesystem.h
kernel/include/interrupt.h
kernel/include/list.h [deleted file]
kernel/include/object.h
kernel/include/pci.h
kernel/include/thread.h
kernel/src/drivers/fs/ram.h
kernel/src/list.c [deleted file]
sdk/device.h [new file with mode: 0644]
sdk/list.h [new file with mode: 0644]
sdk/monolithium.h

index 885ce00c77031cf0f3d0650a19e29d17cf90f835..4b89c75de7b5420a43476db3696e21bdda597e46 100644 (file)
 
 #include <common.h>
 #include <sync.h>
-#include <list.h>
 #include <cache.h>
 #include <filesystem.h>
-
-#define MAX_DEVICE_NAME 32
-
-#define BLOCK_DEVICE_REMOVABLE_MEDIA  (1 << 0)
-
-#define IOCTL_BLOCK_DEV_INFO        0xB0000000
-#define IOCTL_BLOCK_DEV_MEDIA_INFO  0xB0000001
-#define IOCTL_BLOCK_DEV_MEDIA_LOAD  0xB0000002
-#define IOCTL_BLOCK_DEV_MEDIA_EJECT 0xB0000003
-
-#define IOCTL_CHAR_DEV_CHECK_INPUT  0xC0000000
-#define IOCTL_CHAR_DEV_CHECK_OUTPUT 0xC0000001
+#include <sdk/list.h>
+#include <sdk/device.h>
 
 #ifndef DEVICE_TYPEDEF
 #define DEVICE_TYPEDEF
@@ -60,12 +49,6 @@ typedef dword_t (*block_dev_write_proc_t)(device_t *device, const void *buffer,
 typedef dword_t (*char_dev_read_proc_t)(device_t *device, void *buffer, size_t length, size_t *bytes_read);
 typedef dword_t (*char_dev_write_proc_t)(device_t *device, const void *buffer, size_t length, size_t *bytes_written);
 
-typedef enum
-{
-    BLOCK_DEVICE,
-    CHAR_DEVICE
-} device_type_t;
-
 typedef struct
 {
     list_entry_t list;
index acda67523964500b7221c45fd5f2db2ab109c2b7..8fb0eab6b4015ecfc50ed479025fb739d9eaedf3 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <common.h>
 #include <object.h>
-#include <list.h>
+#include <sdk/list.h>
 #include <clock.h>
 #include <sync.h>
 #include <sdk/filesystem.h>
index 96392917979b352e025a7c3e5a84cbef13c69852..9b6c48c47120359a59cd779d97e5d9987e34ed33 100644 (file)
@@ -21,7 +21,7 @@
 #define _INTERRUPT_H_
 
 #include <common.h>
-#include <list.h>
+#include <sdk/list.h>
 
 #define IDT_NUM_INTERRUPTS 256
 #define ISR_STUB_SIZE 64
diff --git a/kernel/include/list.h b/kernel/include/list.h
deleted file mode 100644 (file)
index 189723b..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * list.h
- *
- * Copyright (C) 2015 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _LIST_H_
-#define _LIST_H_
-
-#include <common.h>
-
-#define INITIALIZERS1(name) LIST_INITIALIZER(name[0])
-#define INITIALIZERS2(name) INITIALIZERS1(name), LIST_INITIALIZER(name[1])
-#define INITIALIZERS3(name) INITIALIZERS2(name), LIST_INITIALIZER(name[2])
-#define INITIALIZERS4(name) INITIALIZERS3(name), LIST_INITIALIZER(name[3])
-#define INITIALIZERS5(name) INITIALIZERS4(name), LIST_INITIALIZER(name[4])
-#define INITIALIZERS6(name) INITIALIZERS5(name), LIST_INITIALIZER(name[5])
-#define INITIALIZERS7(name) INITIALIZERS6(name), LIST_INITIALIZER(name[6])
-#define INITIALIZERS8(name) INITIALIZERS7(name), LIST_INITIALIZER(name[7])
-#define INITIALIZERS9(name) INITIALIZERS8(name), LIST_INITIALIZER(name[8])
-#define INITIALIZERS10(name) INITIALIZERS9(name), LIST_INITIALIZER(name[9])
-#define INITIALIZERS11(name) INITIALIZERS10(name), LIST_INITIALIZER(name[10])
-#define INITIALIZERS12(name) INITIALIZERS11(name), LIST_INITIALIZER(name[11])
-#define INITIALIZERS13(name) INITIALIZERS12(name), LIST_INITIALIZER(name[12])
-#define INITIALIZERS14(name) INITIALIZERS13(name), LIST_INITIALIZER(name[13])
-#define INITIALIZERS15(name) INITIALIZERS14(name), LIST_INITIALIZER(name[14])
-#define INITIALIZERS16(name) INITIALIZERS15(name), LIST_INITIALIZER(name[15])
-#define INITIALIZERS17(name) INITIALIZERS16(name), LIST_INITIALIZER(name[16])
-#define INITIALIZERS18(name) INITIALIZERS17(name), LIST_INITIALIZER(name[17])
-#define INITIALIZERS19(name) INITIALIZERS18(name), LIST_INITIALIZER(name[18])
-#define INITIALIZERS20(name) INITIALIZERS19(name), LIST_INITIALIZER(name[19])
-#define INITIALIZERS21(name) INITIALIZERS20(name), LIST_INITIALIZER(name[20])
-#define INITIALIZERS22(name) INITIALIZERS21(name), LIST_INITIALIZER(name[21])
-#define INITIALIZERS23(name) INITIALIZERS22(name), LIST_INITIALIZER(name[22])
-#define INITIALIZERS24(name) INITIALIZERS23(name), LIST_INITIALIZER(name[23])
-#define INITIALIZERS25(name) INITIALIZERS24(name), LIST_INITIALIZER(name[24])
-#define INITIALIZERS26(name) INITIALIZERS25(name), LIST_INITIALIZER(name[25])
-#define INITIALIZERS27(name) INITIALIZERS26(name), LIST_INITIALIZER(name[26])
-#define INITIALIZERS28(name) INITIALIZERS27(name), LIST_INITIALIZER(name[27])
-#define INITIALIZERS29(name) INITIALIZERS28(name), LIST_INITIALIZER(name[28])
-#define INITIALIZERS30(name) INITIALIZERS29(name), LIST_INITIALIZER(name[29])
-#define INITIALIZERS31(name) INITIALIZERS30(name), LIST_INITIALIZER(name[30])
-#define INITIALIZERS32(name) INITIALIZERS31(name), LIST_INITIALIZER(name[31])
-#define INITIALIZERS33(name) INITIALIZERS32(name), LIST_INITIALIZER(name[32])
-#define INITIALIZERS34(name) INITIALIZERS33(name), LIST_INITIALIZER(name[33])
-#define INITIALIZERS35(name) INITIALIZERS34(name), LIST_INITIALIZER(name[34])
-#define INITIALIZERS36(name) INITIALIZERS35(name), LIST_INITIALIZER(name[35])
-#define INITIALIZERS37(name) INITIALIZERS36(name), LIST_INITIALIZER(name[36])
-#define INITIALIZERS38(name) INITIALIZERS37(name), LIST_INITIALIZER(name[37])
-#define INITIALIZERS39(name) INITIALIZERS38(name), LIST_INITIALIZER(name[38])
-#define INITIALIZERS40(name) INITIALIZERS39(name), LIST_INITIALIZER(name[39])
-#define INITIALIZERS41(name) INITIALIZERS40(name), LIST_INITIALIZER(name[40])
-#define INITIALIZERS42(name) INITIALIZERS41(name), LIST_INITIALIZER(name[41])
-#define INITIALIZERS43(name) INITIALIZERS42(name), LIST_INITIALIZER(name[42])
-#define INITIALIZERS44(name) INITIALIZERS43(name), LIST_INITIALIZER(name[43])
-#define INITIALIZERS45(name) INITIALIZERS44(name), LIST_INITIALIZER(name[44])
-#define INITIALIZERS46(name) INITIALIZERS45(name), LIST_INITIALIZER(name[45])
-#define INITIALIZERS47(name) INITIALIZERS46(name), LIST_INITIALIZER(name[46])
-#define INITIALIZERS48(name) INITIALIZERS47(name), LIST_INITIALIZER(name[47])
-#define INITIALIZERS49(name) INITIALIZERS48(name), LIST_INITIALIZER(name[48])
-#define INITIALIZERS50(name) INITIALIZERS49(name), LIST_INITIALIZER(name[49])
-#define INITIALIZERS51(name) INITIALIZERS50(name), LIST_INITIALIZER(name[50])
-#define INITIALIZERS52(name) INITIALIZERS51(name), LIST_INITIALIZER(name[51])
-#define INITIALIZERS53(name) INITIALIZERS52(name), LIST_INITIALIZER(name[52])
-#define INITIALIZERS54(name) INITIALIZERS53(name), LIST_INITIALIZER(name[53])
-#define INITIALIZERS55(name) INITIALIZERS54(name), LIST_INITIALIZER(name[54])
-#define INITIALIZERS56(name) INITIALIZERS55(name), LIST_INITIALIZER(name[55])
-#define INITIALIZERS57(name) INITIALIZERS56(name), LIST_INITIALIZER(name[56])
-#define INITIALIZERS58(name) INITIALIZERS57(name), LIST_INITIALIZER(name[57])
-#define INITIALIZERS59(name) INITIALIZERS58(name), LIST_INITIALIZER(name[58])
-#define INITIALIZERS60(name) INITIALIZERS59(name), LIST_INITIALIZER(name[59])
-#define INITIALIZERS61(name) INITIALIZERS60(name), LIST_INITIALIZER(name[60])
-#define INITIALIZERS62(name) INITIALIZERS61(name), LIST_INITIALIZER(name[61])
-#define INITIALIZERS63(name) INITIALIZERS62(name), LIST_INITIALIZER(name[62])
-#define INITIALIZERS64(name) INITIALIZERS63(name), LIST_INITIALIZER(name[63])
-#define INITIALIZERS65(name) INITIALIZERS64(name), LIST_INITIALIZER(name[64])
-#define INITIALIZERS66(name) INITIALIZERS65(name), LIST_INITIALIZER(name[65])
-#define INITIALIZERS67(name) INITIALIZERS66(name), LIST_INITIALIZER(name[66])
-#define INITIALIZERS68(name) INITIALIZERS67(name), LIST_INITIALIZER(name[67])
-#define INITIALIZERS69(name) INITIALIZERS68(name), LIST_INITIALIZER(name[68])
-#define INITIALIZERS70(name) INITIALIZERS69(name), LIST_INITIALIZER(name[69])
-#define INITIALIZERS71(name) INITIALIZERS70(name), LIST_INITIALIZER(name[70])
-#define INITIALIZERS72(name) INITIALIZERS71(name), LIST_INITIALIZER(name[71])
-#define INITIALIZERS73(name) INITIALIZERS72(name), LIST_INITIALIZER(name[72])
-#define INITIALIZERS74(name) INITIALIZERS73(name), LIST_INITIALIZER(name[73])
-#define INITIALIZERS75(name) INITIALIZERS74(name), LIST_INITIALIZER(name[74])
-#define INITIALIZERS76(name) INITIALIZERS75(name), LIST_INITIALIZER(name[75])
-#define INITIALIZERS77(name) INITIALIZERS76(name), LIST_INITIALIZER(name[76])
-#define INITIALIZERS78(name) INITIALIZERS77(name), LIST_INITIALIZER(name[77])
-#define INITIALIZERS79(name) INITIALIZERS78(name), LIST_INITIALIZER(name[78])
-#define INITIALIZERS80(name) INITIALIZERS79(name), LIST_INITIALIZER(name[79])
-#define INITIALIZERS81(name) INITIALIZERS80(name), LIST_INITIALIZER(name[80])
-#define INITIALIZERS82(name) INITIALIZERS81(name), LIST_INITIALIZER(name[81])
-#define INITIALIZERS83(name) INITIALIZERS82(name), LIST_INITIALIZER(name[82])
-#define INITIALIZERS84(name) INITIALIZERS83(name), LIST_INITIALIZER(name[83])
-#define INITIALIZERS85(name) INITIALIZERS84(name), LIST_INITIALIZER(name[84])
-#define INITIALIZERS86(name) INITIALIZERS85(name), LIST_INITIALIZER(name[85])
-#define INITIALIZERS87(name) INITIALIZERS86(name), LIST_INITIALIZER(name[86])
-#define INITIALIZERS88(name) INITIALIZERS87(name), LIST_INITIALIZER(name[87])
-#define INITIALIZERS89(name) INITIALIZERS88(name), LIST_INITIALIZER(name[88])
-#define INITIALIZERS90(name) INITIALIZERS89(name), LIST_INITIALIZER(name[89])
-#define INITIALIZERS91(name) INITIALIZERS90(name), LIST_INITIALIZER(name[90])
-#define INITIALIZERS92(name) INITIALIZERS91(name), LIST_INITIALIZER(name[91])
-#define INITIALIZERS93(name) INITIALIZERS92(name), LIST_INITIALIZER(name[92])
-#define INITIALIZERS94(name) INITIALIZERS93(name), LIST_INITIALIZER(name[93])
-#define INITIALIZERS95(name) INITIALIZERS94(name), LIST_INITIALIZER(name[94])
-#define INITIALIZERS96(name) INITIALIZERS95(name), LIST_INITIALIZER(name[95])
-#define INITIALIZERS97(name) INITIALIZERS96(name), LIST_INITIALIZER(name[96])
-#define INITIALIZERS98(name) INITIALIZERS97(name), LIST_INITIALIZER(name[97])
-#define INITIALIZERS99(name) INITIALIZERS98(name), LIST_INITIALIZER(name[98])
-#define INITIALIZERS100(name) INITIALIZERS99(name), LIST_INITIALIZER(name[99])
-#define INITIALIZERS101(name) INITIALIZERS100(name), LIST_INITIALIZER(name[100])
-#define INITIALIZERS102(name) INITIALIZERS101(name), LIST_INITIALIZER(name[101])
-#define INITIALIZERS103(name) INITIALIZERS102(name), LIST_INITIALIZER(name[102])
-#define INITIALIZERS104(name) INITIALIZERS103(name), LIST_INITIALIZER(name[103])
-#define INITIALIZERS105(name) INITIALIZERS104(name), LIST_INITIALIZER(name[104])
-#define INITIALIZERS106(name) INITIALIZERS105(name), LIST_INITIALIZER(name[105])
-#define INITIALIZERS107(name) INITIALIZERS106(name), LIST_INITIALIZER(name[106])
-#define INITIALIZERS108(name) INITIALIZERS107(name), LIST_INITIALIZER(name[107])
-#define INITIALIZERS109(name) INITIALIZERS108(name), LIST_INITIALIZER(name[108])
-#define INITIALIZERS110(name) INITIALIZERS109(name), LIST_INITIALIZER(name[109])
-#define INITIALIZERS111(name) INITIALIZERS110(name), LIST_INITIALIZER(name[110])
-#define INITIALIZERS112(name) INITIALIZERS111(name), LIST_INITIALIZER(name[111])
-#define INITIALIZERS113(name) INITIALIZERS112(name), LIST_INITIALIZER(name[112])
-#define INITIALIZERS114(name) INITIALIZERS113(name), LIST_INITIALIZER(name[113])
-#define INITIALIZERS115(name) INITIALIZERS114(name), LIST_INITIALIZER(name[114])
-#define INITIALIZERS116(name) INITIALIZERS115(name), LIST_INITIALIZER(name[115])
-#define INITIALIZERS117(name) INITIALIZERS116(name), LIST_INITIALIZER(name[116])
-#define INITIALIZERS118(name) INITIALIZERS117(name), LIST_INITIALIZER(name[117])
-#define INITIALIZERS119(name) INITIALIZERS118(name), LIST_INITIALIZER(name[118])
-#define INITIALIZERS120(name) INITIALIZERS119(name), LIST_INITIALIZER(name[119])
-#define INITIALIZERS121(name) INITIALIZERS120(name), LIST_INITIALIZER(name[120])
-#define INITIALIZERS122(name) INITIALIZERS121(name), LIST_INITIALIZER(name[121])
-#define INITIALIZERS123(name) INITIALIZERS122(name), LIST_INITIALIZER(name[122])
-#define INITIALIZERS124(name) INITIALIZERS123(name), LIST_INITIALIZER(name[123])
-#define INITIALIZERS125(name) INITIALIZERS124(name), LIST_INITIALIZER(name[124])
-#define INITIALIZERS126(name) INITIALIZERS125(name), LIST_INITIALIZER(name[125])
-#define INITIALIZERS127(name) INITIALIZERS126(name), LIST_INITIALIZER(name[126])
-#define INITIALIZERS128(name) INITIALIZERS127(name), LIST_INITIALIZER(name[127])
-#define INITIALIZERS129(name) INITIALIZERS128(name), LIST_INITIALIZER(name[128])
-#define INITIALIZERS130(name) INITIALIZERS129(name), LIST_INITIALIZER(name[129])
-#define INITIALIZERS131(name) INITIALIZERS130(name), LIST_INITIALIZER(name[130])
-#define INITIALIZERS132(name) INITIALIZERS131(name), LIST_INITIALIZER(name[131])
-#define INITIALIZERS133(name) INITIALIZERS132(name), LIST_INITIALIZER(name[132])
-#define INITIALIZERS134(name) INITIALIZERS133(name), LIST_INITIALIZER(name[133])
-#define INITIALIZERS135(name) INITIALIZERS134(name), LIST_INITIALIZER(name[134])
-#define INITIALIZERS136(name) INITIALIZERS135(name), LIST_INITIALIZER(name[135])
-#define INITIALIZERS137(name) INITIALIZERS136(name), LIST_INITIALIZER(name[136])
-#define INITIALIZERS138(name) INITIALIZERS137(name), LIST_INITIALIZER(name[137])
-#define INITIALIZERS139(name) INITIALIZERS138(name), LIST_INITIALIZER(name[138])
-#define INITIALIZERS140(name) INITIALIZERS139(name), LIST_INITIALIZER(name[139])
-#define INITIALIZERS141(name) INITIALIZERS140(name), LIST_INITIALIZER(name[140])
-#define INITIALIZERS142(name) INITIALIZERS141(name), LIST_INITIALIZER(name[141])
-#define INITIALIZERS143(name) INITIALIZERS142(name), LIST_INITIALIZER(name[142])
-#define INITIALIZERS144(name) INITIALIZERS143(name), LIST_INITIALIZER(name[143])
-#define INITIALIZERS145(name) INITIALIZERS144(name), LIST_INITIALIZER(name[144])
-#define INITIALIZERS146(name) INITIALIZERS145(name), LIST_INITIALIZER(name[145])
-#define INITIALIZERS147(name) INITIALIZERS146(name), LIST_INITIALIZER(name[146])
-#define INITIALIZERS148(name) INITIALIZERS147(name), LIST_INITIALIZER(name[147])
-#define INITIALIZERS149(name) INITIALIZERS148(name), LIST_INITIALIZER(name[148])
-#define INITIALIZERS150(name) INITIALIZERS149(name), LIST_INITIALIZER(name[149])
-#define INITIALIZERS151(name) INITIALIZERS150(name), LIST_INITIALIZER(name[150])
-#define INITIALIZERS152(name) INITIALIZERS151(name), LIST_INITIALIZER(name[151])
-#define INITIALIZERS153(name) INITIALIZERS152(name), LIST_INITIALIZER(name[152])
-#define INITIALIZERS154(name) INITIALIZERS153(name), LIST_INITIALIZER(name[153])
-#define INITIALIZERS155(name) INITIALIZERS154(name), LIST_INITIALIZER(name[154])
-#define INITIALIZERS156(name) INITIALIZERS155(name), LIST_INITIALIZER(name[155])
-#define INITIALIZERS157(name) INITIALIZERS156(name), LIST_INITIALIZER(name[156])
-#define INITIALIZERS158(name) INITIALIZERS157(name), LIST_INITIALIZER(name[157])
-#define INITIALIZERS159(name) INITIALIZERS158(name), LIST_INITIALIZER(name[158])
-#define INITIALIZERS160(name) INITIALIZERS159(name), LIST_INITIALIZER(name[159])
-#define INITIALIZERS161(name) INITIALIZERS160(name), LIST_INITIALIZER(name[160])
-#define INITIALIZERS162(name) INITIALIZERS161(name), LIST_INITIALIZER(name[161])
-#define INITIALIZERS163(name) INITIALIZERS162(name), LIST_INITIALIZER(name[162])
-#define INITIALIZERS164(name) INITIALIZERS163(name), LIST_INITIALIZER(name[163])
-#define INITIALIZERS165(name) INITIALIZERS164(name), LIST_INITIALIZER(name[164])
-#define INITIALIZERS166(name) INITIALIZERS165(name), LIST_INITIALIZER(name[165])
-#define INITIALIZERS167(name) INITIALIZERS166(name), LIST_INITIALIZER(name[166])
-#define INITIALIZERS168(name) INITIALIZERS167(name), LIST_INITIALIZER(name[167])
-#define INITIALIZERS169(name) INITIALIZERS168(name), LIST_INITIALIZER(name[168])
-#define INITIALIZERS170(name) INITIALIZERS169(name), LIST_INITIALIZER(name[169])
-#define INITIALIZERS171(name) INITIALIZERS170(name), LIST_INITIALIZER(name[170])
-#define INITIALIZERS172(name) INITIALIZERS171(name), LIST_INITIALIZER(name[171])
-#define INITIALIZERS173(name) INITIALIZERS172(name), LIST_INITIALIZER(name[172])
-#define INITIALIZERS174(name) INITIALIZERS173(name), LIST_INITIALIZER(name[173])
-#define INITIALIZERS175(name) INITIALIZERS174(name), LIST_INITIALIZER(name[174])
-#define INITIALIZERS176(name) INITIALIZERS175(name), LIST_INITIALIZER(name[175])
-#define INITIALIZERS177(name) INITIALIZERS176(name), LIST_INITIALIZER(name[176])
-#define INITIALIZERS178(name) INITIALIZERS177(name), LIST_INITIALIZER(name[177])
-#define INITIALIZERS179(name) INITIALIZERS178(name), LIST_INITIALIZER(name[178])
-#define INITIALIZERS180(name) INITIALIZERS179(name), LIST_INITIALIZER(name[179])
-#define INITIALIZERS181(name) INITIALIZERS180(name), LIST_INITIALIZER(name[180])
-#define INITIALIZERS182(name) INITIALIZERS181(name), LIST_INITIALIZER(name[181])
-#define INITIALIZERS183(name) INITIALIZERS182(name), LIST_INITIALIZER(name[182])
-#define INITIALIZERS184(name) INITIALIZERS183(name), LIST_INITIALIZER(name[183])
-#define INITIALIZERS185(name) INITIALIZERS184(name), LIST_INITIALIZER(name[184])
-#define INITIALIZERS186(name) INITIALIZERS185(name), LIST_INITIALIZER(name[185])
-#define INITIALIZERS187(name) INITIALIZERS186(name), LIST_INITIALIZER(name[186])
-#define INITIALIZERS188(name) INITIALIZERS187(name), LIST_INITIALIZER(name[187])
-#define INITIALIZERS189(name) INITIALIZERS188(name), LIST_INITIALIZER(name[188])
-#define INITIALIZERS190(name) INITIALIZERS189(name), LIST_INITIALIZER(name[189])
-#define INITIALIZERS191(name) INITIALIZERS190(name), LIST_INITIALIZER(name[190])
-#define INITIALIZERS192(name) INITIALIZERS191(name), LIST_INITIALIZER(name[191])
-#define INITIALIZERS193(name) INITIALIZERS192(name), LIST_INITIALIZER(name[192])
-#define INITIALIZERS194(name) INITIALIZERS193(name), LIST_INITIALIZER(name[193])
-#define INITIALIZERS195(name) INITIALIZERS194(name), LIST_INITIALIZER(name[194])
-#define INITIALIZERS196(name) INITIALIZERS195(name), LIST_INITIALIZER(name[195])
-#define INITIALIZERS197(name) INITIALIZERS196(name), LIST_INITIALIZER(name[196])
-#define INITIALIZERS198(name) INITIALIZERS197(name), LIST_INITIALIZER(name[197])
-#define INITIALIZERS199(name) INITIALIZERS198(name), LIST_INITIALIZER(name[198])
-#define INITIALIZERS200(name) INITIALIZERS199(name), LIST_INITIALIZER(name[199])
-#define INITIALIZERS201(name) INITIALIZERS200(name), LIST_INITIALIZER(name[200])
-#define INITIALIZERS202(name) INITIALIZERS201(name), LIST_INITIALIZER(name[201])
-#define INITIALIZERS203(name) INITIALIZERS202(name), LIST_INITIALIZER(name[202])
-#define INITIALIZERS204(name) INITIALIZERS203(name), LIST_INITIALIZER(name[203])
-#define INITIALIZERS205(name) INITIALIZERS204(name), LIST_INITIALIZER(name[204])
-#define INITIALIZERS206(name) INITIALIZERS205(name), LIST_INITIALIZER(name[205])
-#define INITIALIZERS207(name) INITIALIZERS206(name), LIST_INITIALIZER(name[206])
-#define INITIALIZERS208(name) INITIALIZERS207(name), LIST_INITIALIZER(name[207])
-#define INITIALIZERS209(name) INITIALIZERS208(name), LIST_INITIALIZER(name[208])
-#define INITIALIZERS210(name) INITIALIZERS209(name), LIST_INITIALIZER(name[209])
-#define INITIALIZERS211(name) INITIALIZERS210(name), LIST_INITIALIZER(name[210])
-#define INITIALIZERS212(name) INITIALIZERS211(name), LIST_INITIALIZER(name[211])
-#define INITIALIZERS213(name) INITIALIZERS212(name), LIST_INITIALIZER(name[212])
-#define INITIALIZERS214(name) INITIALIZERS213(name), LIST_INITIALIZER(name[213])
-#define INITIALIZERS215(name) INITIALIZERS214(name), LIST_INITIALIZER(name[214])
-#define INITIALIZERS216(name) INITIALIZERS215(name), LIST_INITIALIZER(name[215])
-#define INITIALIZERS217(name) INITIALIZERS216(name), LIST_INITIALIZER(name[216])
-#define INITIALIZERS218(name) INITIALIZERS217(name), LIST_INITIALIZER(name[217])
-#define INITIALIZERS219(name) INITIALIZERS218(name), LIST_INITIALIZER(name[218])
-#define INITIALIZERS220(name) INITIALIZERS219(name), LIST_INITIALIZER(name[219])
-#define INITIALIZERS221(name) INITIALIZERS220(name), LIST_INITIALIZER(name[220])
-#define INITIALIZERS222(name) INITIALIZERS221(name), LIST_INITIALIZER(name[221])
-#define INITIALIZERS223(name) INITIALIZERS222(name), LIST_INITIALIZER(name[222])
-#define INITIALIZERS224(name) INITIALIZERS223(name), LIST_INITIALIZER(name[223])
-#define INITIALIZERS225(name) INITIALIZERS224(name), LIST_INITIALIZER(name[224])
-#define INITIALIZERS226(name) INITIALIZERS225(name), LIST_INITIALIZER(name[225])
-#define INITIALIZERS227(name) INITIALIZERS226(name), LIST_INITIALIZER(name[226])
-#define INITIALIZERS228(name) INITIALIZERS227(name), LIST_INITIALIZER(name[227])
-#define INITIALIZERS229(name) INITIALIZERS228(name), LIST_INITIALIZER(name[228])
-#define INITIALIZERS230(name) INITIALIZERS229(name), LIST_INITIALIZER(name[229])
-#define INITIALIZERS231(name) INITIALIZERS230(name), LIST_INITIALIZER(name[230])
-#define INITIALIZERS232(name) INITIALIZERS231(name), LIST_INITIALIZER(name[231])
-#define INITIALIZERS233(name) INITIALIZERS232(name), LIST_INITIALIZER(name[232])
-#define INITIALIZERS234(name) INITIALIZERS233(name), LIST_INITIALIZER(name[233])
-#define INITIALIZERS235(name) INITIALIZERS234(name), LIST_INITIALIZER(name[234])
-#define INITIALIZERS236(name) INITIALIZERS235(name), LIST_INITIALIZER(name[235])
-#define INITIALIZERS237(name) INITIALIZERS236(name), LIST_INITIALIZER(name[236])
-#define INITIALIZERS238(name) INITIALIZERS237(name), LIST_INITIALIZER(name[237])
-#define INITIALIZERS239(name) INITIALIZERS238(name), LIST_INITIALIZER(name[238])
-#define INITIALIZERS240(name) INITIALIZERS239(name), LIST_INITIALIZER(name[239])
-#define INITIALIZERS241(name) INITIALIZERS240(name), LIST_INITIALIZER(name[240])
-#define INITIALIZERS242(name) INITIALIZERS241(name), LIST_INITIALIZER(name[241])
-#define INITIALIZERS243(name) INITIALIZERS242(name), LIST_INITIALIZER(name[242])
-#define INITIALIZERS244(name) INITIALIZERS243(name), LIST_INITIALIZER(name[243])
-#define INITIALIZERS245(name) INITIALIZERS244(name), LIST_INITIALIZER(name[244])
-#define INITIALIZERS246(name) INITIALIZERS245(name), LIST_INITIALIZER(name[245])
-#define INITIALIZERS247(name) INITIALIZERS246(name), LIST_INITIALIZER(name[246])
-#define INITIALIZERS248(name) INITIALIZERS247(name), LIST_INITIALIZER(name[247])
-#define INITIALIZERS249(name) INITIALIZERS248(name), LIST_INITIALIZER(name[248])
-#define INITIALIZERS250(name) INITIALIZERS249(name), LIST_INITIALIZER(name[249])
-#define INITIALIZERS251(name) INITIALIZERS250(name), LIST_INITIALIZER(name[250])
-#define INITIALIZERS252(name) INITIALIZERS251(name), LIST_INITIALIZER(name[251])
-#define INITIALIZERS253(name) INITIALIZERS252(name), LIST_INITIALIZER(name[252])
-#define INITIALIZERS254(name) INITIALIZERS253(name), LIST_INITIALIZER(name[253])
-#define INITIALIZERS255(name) INITIALIZERS254(name), LIST_INITIALIZER(name[254])
-#define INITIALIZERS256(name) INITIALIZERS255(name), LIST_INITIALIZER(name[255])
-
-#define LIST_INITIALIZER(name) { &name, &name }
-#define DECLARE_LIST(name) list_entry_t name = LIST_INITIALIZER(name)
-#define DECLARE_LIST_ARRAY(name, size) list_entry_t name[size] = { INITIALIZERS##size(name) }
-
-#define list_put_after  list_prepend
-#define list_put_before list_append
-
-typedef struct _list_entry_t
-{
-    struct _list_entry_t *next, *prev;
-} list_entry_t;
-
-void list_prepend(list_entry_t *list, list_entry_t *entry);
-void list_append(list_entry_t *list, list_entry_t *entry);
-void list_remove(list_entry_t *entry);
-void list_init(list_entry_t *list);
-
-#endif
index 06bab1aa5bf151773f6134a7a046412237a1c5ff..5c6c424f000df997cbbb3b5f3f4aa64b4ae8dc53 100644 (file)
@@ -21,7 +21,7 @@
 #define _OBJECT_H_
 
 #include <sdk/object.h>
-#include <list.h>
+#include <sdk/list.h>
 
 typedef struct
 {
index 4d3b78bbe2936bdee35615b00b1082aa6a068f1f..e27058ba8c9ccb82fe1bd6355f302329dcb93a3d 100644 (file)
@@ -21,7 +21,7 @@
 #define _PCI_H_
 
 #include <common.h>
-#include <list.h>
+#include <sdk/list.h>
 
 #pragma pack(push, 1)
 
index 9faff1b95ab67aecbdc134ca4738807b63790461..3cfddaf21441e56d2d9cc58de8ef902da2998e5b 100644 (file)
@@ -23,7 +23,7 @@
 #include <common.h>
 #include <object.h>
 #include <exception.h>
-#include <list.h>
+#include <sdk/list.h>
 #include <sync.h>
 #include <interrupt.h>
 #include <syscalls.h>
index cbb789023de7450bf58a6679554ea085e3948291..7bfebb74c93b0926015549355353376241455198 100644 (file)
@@ -21,7 +21,7 @@
 #define _RAM_H_
 
 #include <common.h>
-#include <list.h>
+#include <sdk/list.h>
 #include <clock.h>
 #include <filesystem.h>
 
diff --git a/kernel/src/list.c b/kernel/src/list.c
deleted file mode 100644 (file)
index df1a088..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * list.c
- *
- * Copyright (C) 2015 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <list.h>
-
-void list_prepend(list_entry_t *list, list_entry_t *entry)
-{
-    entry->next = list->next;
-    entry->prev = list;
-    entry->next->prev = entry;
-    entry->prev->next = entry;
-}
-
-void list_append(list_entry_t *list, list_entry_t *entry)
-{
-    entry->next = list;
-    entry->prev = list->prev;
-    entry->next->prev = entry;
-    entry->prev->next = entry;
-}
-
-void list_remove(list_entry_t *entry)
-{
-    entry->next->prev = entry->prev;
-    entry->prev->next = entry->next;
-}
-
-void list_init(list_entry_t *list)
-{
-    list->next = list->prev = list;
-}
diff --git a/sdk/device.h b/sdk/device.h
new file mode 100644 (file)
index 0000000..406d914
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * device.h
+ *
+ * Copyright (C) 2016 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MONOLITHIUM_DEVICE_H__
+#define __MONOLITHIUM_DEVICE_H__
+
+#define MAX_DEVICE_NAME 32
+
+#define BLOCK_DEVICE_REMOVABLE_MEDIA  (1 << 0)
+
+#define IOCTL_BLOCK_DEV_INFO        0xB0000000
+#define IOCTL_BLOCK_DEV_MEDIA_INFO  0xB0000001
+#define IOCTL_BLOCK_DEV_MEDIA_LOAD  0xB0000002
+#define IOCTL_BLOCK_DEV_MEDIA_EJECT 0xB0000003
+
+#define IOCTL_CHAR_DEV_CHECK_INPUT  0xC0000000
+#define IOCTL_CHAR_DEV_CHECK_OUTPUT 0xC0000001
+
+typedef enum
+{
+    BLOCK_DEVICE,
+    CHAR_DEVICE
+} device_type_t;
+
+#endif
diff --git a/sdk/list.h b/sdk/list.h
new file mode 100644 (file)
index 0000000..623a22e
--- /dev/null
@@ -0,0 +1,321 @@
+/*
+ * list.h
+ *
+ * Copyright (C) 2015 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MONOLITHIUM_LIST_H__
+#define __MONOLITHIUM_LIST_H__
+
+#include "defs.h"
+
+#define INITIALIZERS1(name) LIST_INITIALIZER(name[0])
+#define INITIALIZERS2(name) INITIALIZERS1(name), LIST_INITIALIZER(name[1])
+#define INITIALIZERS3(name) INITIALIZERS2(name), LIST_INITIALIZER(name[2])
+#define INITIALIZERS4(name) INITIALIZERS3(name), LIST_INITIALIZER(name[3])
+#define INITIALIZERS5(name) INITIALIZERS4(name), LIST_INITIALIZER(name[4])
+#define INITIALIZERS6(name) INITIALIZERS5(name), LIST_INITIALIZER(name[5])
+#define INITIALIZERS7(name) INITIALIZERS6(name), LIST_INITIALIZER(name[6])
+#define INITIALIZERS8(name) INITIALIZERS7(name), LIST_INITIALIZER(name[7])
+#define INITIALIZERS9(name) INITIALIZERS8(name), LIST_INITIALIZER(name[8])
+#define INITIALIZERS10(name) INITIALIZERS9(name), LIST_INITIALIZER(name[9])
+#define INITIALIZERS11(name) INITIALIZERS10(name), LIST_INITIALIZER(name[10])
+#define INITIALIZERS12(name) INITIALIZERS11(name), LIST_INITIALIZER(name[11])
+#define INITIALIZERS13(name) INITIALIZERS12(name), LIST_INITIALIZER(name[12])
+#define INITIALIZERS14(name) INITIALIZERS13(name), LIST_INITIALIZER(name[13])
+#define INITIALIZERS15(name) INITIALIZERS14(name), LIST_INITIALIZER(name[14])
+#define INITIALIZERS16(name) INITIALIZERS15(name), LIST_INITIALIZER(name[15])
+#define INITIALIZERS17(name) INITIALIZERS16(name), LIST_INITIALIZER(name[16])
+#define INITIALIZERS18(name) INITIALIZERS17(name), LIST_INITIALIZER(name[17])
+#define INITIALIZERS19(name) INITIALIZERS18(name), LIST_INITIALIZER(name[18])
+#define INITIALIZERS20(name) INITIALIZERS19(name), LIST_INITIALIZER(name[19])
+#define INITIALIZERS21(name) INITIALIZERS20(name), LIST_INITIALIZER(name[20])
+#define INITIALIZERS22(name) INITIALIZERS21(name), LIST_INITIALIZER(name[21])
+#define INITIALIZERS23(name) INITIALIZERS22(name), LIST_INITIALIZER(name[22])
+#define INITIALIZERS24(name) INITIALIZERS23(name), LIST_INITIALIZER(name[23])
+#define INITIALIZERS25(name) INITIALIZERS24(name), LIST_INITIALIZER(name[24])
+#define INITIALIZERS26(name) INITIALIZERS25(name), LIST_INITIALIZER(name[25])
+#define INITIALIZERS27(name) INITIALIZERS26(name), LIST_INITIALIZER(name[26])
+#define INITIALIZERS28(name) INITIALIZERS27(name), LIST_INITIALIZER(name[27])
+#define INITIALIZERS29(name) INITIALIZERS28(name), LIST_INITIALIZER(name[28])
+#define INITIALIZERS30(name) INITIALIZERS29(name), LIST_INITIALIZER(name[29])
+#define INITIALIZERS31(name) INITIALIZERS30(name), LIST_INITIALIZER(name[30])
+#define INITIALIZERS32(name) INITIALIZERS31(name), LIST_INITIALIZER(name[31])
+#define INITIALIZERS33(name) INITIALIZERS32(name), LIST_INITIALIZER(name[32])
+#define INITIALIZERS34(name) INITIALIZERS33(name), LIST_INITIALIZER(name[33])
+#define INITIALIZERS35(name) INITIALIZERS34(name), LIST_INITIALIZER(name[34])
+#define INITIALIZERS36(name) INITIALIZERS35(name), LIST_INITIALIZER(name[35])
+#define INITIALIZERS37(name) INITIALIZERS36(name), LIST_INITIALIZER(name[36])
+#define INITIALIZERS38(name) INITIALIZERS37(name), LIST_INITIALIZER(name[37])
+#define INITIALIZERS39(name) INITIALIZERS38(name), LIST_INITIALIZER(name[38])
+#define INITIALIZERS40(name) INITIALIZERS39(name), LIST_INITIALIZER(name[39])
+#define INITIALIZERS41(name) INITIALIZERS40(name), LIST_INITIALIZER(name[40])
+#define INITIALIZERS42(name) INITIALIZERS41(name), LIST_INITIALIZER(name[41])
+#define INITIALIZERS43(name) INITIALIZERS42(name), LIST_INITIALIZER(name[42])
+#define INITIALIZERS44(name) INITIALIZERS43(name), LIST_INITIALIZER(name[43])
+#define INITIALIZERS45(name) INITIALIZERS44(name), LIST_INITIALIZER(name[44])
+#define INITIALIZERS46(name) INITIALIZERS45(name), LIST_INITIALIZER(name[45])
+#define INITIALIZERS47(name) INITIALIZERS46(name), LIST_INITIALIZER(name[46])
+#define INITIALIZERS48(name) INITIALIZERS47(name), LIST_INITIALIZER(name[47])
+#define INITIALIZERS49(name) INITIALIZERS48(name), LIST_INITIALIZER(name[48])
+#define INITIALIZERS50(name) INITIALIZERS49(name), LIST_INITIALIZER(name[49])
+#define INITIALIZERS51(name) INITIALIZERS50(name), LIST_INITIALIZER(name[50])
+#define INITIALIZERS52(name) INITIALIZERS51(name), LIST_INITIALIZER(name[51])
+#define INITIALIZERS53(name) INITIALIZERS52(name), LIST_INITIALIZER(name[52])
+#define INITIALIZERS54(name) INITIALIZERS53(name), LIST_INITIALIZER(name[53])
+#define INITIALIZERS55(name) INITIALIZERS54(name), LIST_INITIALIZER(name[54])
+#define INITIALIZERS56(name) INITIALIZERS55(name), LIST_INITIALIZER(name[55])
+#define INITIALIZERS57(name) INITIALIZERS56(name), LIST_INITIALIZER(name[56])
+#define INITIALIZERS58(name) INITIALIZERS57(name), LIST_INITIALIZER(name[57])
+#define INITIALIZERS59(name) INITIALIZERS58(name), LIST_INITIALIZER(name[58])
+#define INITIALIZERS60(name) INITIALIZERS59(name), LIST_INITIALIZER(name[59])
+#define INITIALIZERS61(name) INITIALIZERS60(name), LIST_INITIALIZER(name[60])
+#define INITIALIZERS62(name) INITIALIZERS61(name), LIST_INITIALIZER(name[61])
+#define INITIALIZERS63(name) INITIALIZERS62(name), LIST_INITIALIZER(name[62])
+#define INITIALIZERS64(name) INITIALIZERS63(name), LIST_INITIALIZER(name[63])
+#define INITIALIZERS65(name) INITIALIZERS64(name), LIST_INITIALIZER(name[64])
+#define INITIALIZERS66(name) INITIALIZERS65(name), LIST_INITIALIZER(name[65])
+#define INITIALIZERS67(name) INITIALIZERS66(name), LIST_INITIALIZER(name[66])
+#define INITIALIZERS68(name) INITIALIZERS67(name), LIST_INITIALIZER(name[67])
+#define INITIALIZERS69(name) INITIALIZERS68(name), LIST_INITIALIZER(name[68])
+#define INITIALIZERS70(name) INITIALIZERS69(name), LIST_INITIALIZER(name[69])
+#define INITIALIZERS71(name) INITIALIZERS70(name), LIST_INITIALIZER(name[70])
+#define INITIALIZERS72(name) INITIALIZERS71(name), LIST_INITIALIZER(name[71])
+#define INITIALIZERS73(name) INITIALIZERS72(name), LIST_INITIALIZER(name[72])
+#define INITIALIZERS74(name) INITIALIZERS73(name), LIST_INITIALIZER(name[73])
+#define INITIALIZERS75(name) INITIALIZERS74(name), LIST_INITIALIZER(name[74])
+#define INITIALIZERS76(name) INITIALIZERS75(name), LIST_INITIALIZER(name[75])
+#define INITIALIZERS77(name) INITIALIZERS76(name), LIST_INITIALIZER(name[76])
+#define INITIALIZERS78(name) INITIALIZERS77(name), LIST_INITIALIZER(name[77])
+#define INITIALIZERS79(name) INITIALIZERS78(name), LIST_INITIALIZER(name[78])
+#define INITIALIZERS80(name) INITIALIZERS79(name), LIST_INITIALIZER(name[79])
+#define INITIALIZERS81(name) INITIALIZERS80(name), LIST_INITIALIZER(name[80])
+#define INITIALIZERS82(name) INITIALIZERS81(name), LIST_INITIALIZER(name[81])
+#define INITIALIZERS83(name) INITIALIZERS82(name), LIST_INITIALIZER(name[82])
+#define INITIALIZERS84(name) INITIALIZERS83(name), LIST_INITIALIZER(name[83])
+#define INITIALIZERS85(name) INITIALIZERS84(name), LIST_INITIALIZER(name[84])
+#define INITIALIZERS86(name) INITIALIZERS85(name), LIST_INITIALIZER(name[85])
+#define INITIALIZERS87(name) INITIALIZERS86(name), LIST_INITIALIZER(name[86])
+#define INITIALIZERS88(name) INITIALIZERS87(name), LIST_INITIALIZER(name[87])
+#define INITIALIZERS89(name) INITIALIZERS88(name), LIST_INITIALIZER(name[88])
+#define INITIALIZERS90(name) INITIALIZERS89(name), LIST_INITIALIZER(name[89])
+#define INITIALIZERS91(name) INITIALIZERS90(name), LIST_INITIALIZER(name[90])
+#define INITIALIZERS92(name) INITIALIZERS91(name), LIST_INITIALIZER(name[91])
+#define INITIALIZERS93(name) INITIALIZERS92(name), LIST_INITIALIZER(name[92])
+#define INITIALIZERS94(name) INITIALIZERS93(name), LIST_INITIALIZER(name[93])
+#define INITIALIZERS95(name) INITIALIZERS94(name), LIST_INITIALIZER(name[94])
+#define INITIALIZERS96(name) INITIALIZERS95(name), LIST_INITIALIZER(name[95])
+#define INITIALIZERS97(name) INITIALIZERS96(name), LIST_INITIALIZER(name[96])
+#define INITIALIZERS98(name) INITIALIZERS97(name), LIST_INITIALIZER(name[97])
+#define INITIALIZERS99(name) INITIALIZERS98(name), LIST_INITIALIZER(name[98])
+#define INITIALIZERS100(name) INITIALIZERS99(name), LIST_INITIALIZER(name[99])
+#define INITIALIZERS101(name) INITIALIZERS100(name), LIST_INITIALIZER(name[100])
+#define INITIALIZERS102(name) INITIALIZERS101(name), LIST_INITIALIZER(name[101])
+#define INITIALIZERS103(name) INITIALIZERS102(name), LIST_INITIALIZER(name[102])
+#define INITIALIZERS104(name) INITIALIZERS103(name), LIST_INITIALIZER(name[103])
+#define INITIALIZERS105(name) INITIALIZERS104(name), LIST_INITIALIZER(name[104])
+#define INITIALIZERS106(name) INITIALIZERS105(name), LIST_INITIALIZER(name[105])
+#define INITIALIZERS107(name) INITIALIZERS106(name), LIST_INITIALIZER(name[106])
+#define INITIALIZERS108(name) INITIALIZERS107(name), LIST_INITIALIZER(name[107])
+#define INITIALIZERS109(name) INITIALIZERS108(name), LIST_INITIALIZER(name[108])
+#define INITIALIZERS110(name) INITIALIZERS109(name), LIST_INITIALIZER(name[109])
+#define INITIALIZERS111(name) INITIALIZERS110(name), LIST_INITIALIZER(name[110])
+#define INITIALIZERS112(name) INITIALIZERS111(name), LIST_INITIALIZER(name[111])
+#define INITIALIZERS113(name) INITIALIZERS112(name), LIST_INITIALIZER(name[112])
+#define INITIALIZERS114(name) INITIALIZERS113(name), LIST_INITIALIZER(name[113])
+#define INITIALIZERS115(name) INITIALIZERS114(name), LIST_INITIALIZER(name[114])
+#define INITIALIZERS116(name) INITIALIZERS115(name), LIST_INITIALIZER(name[115])
+#define INITIALIZERS117(name) INITIALIZERS116(name), LIST_INITIALIZER(name[116])
+#define INITIALIZERS118(name) INITIALIZERS117(name), LIST_INITIALIZER(name[117])
+#define INITIALIZERS119(name) INITIALIZERS118(name), LIST_INITIALIZER(name[118])
+#define INITIALIZERS120(name) INITIALIZERS119(name), LIST_INITIALIZER(name[119])
+#define INITIALIZERS121(name) INITIALIZERS120(name), LIST_INITIALIZER(name[120])
+#define INITIALIZERS122(name) INITIALIZERS121(name), LIST_INITIALIZER(name[121])
+#define INITIALIZERS123(name) INITIALIZERS122(name), LIST_INITIALIZER(name[122])
+#define INITIALIZERS124(name) INITIALIZERS123(name), LIST_INITIALIZER(name[123])
+#define INITIALIZERS125(name) INITIALIZERS124(name), LIST_INITIALIZER(name[124])
+#define INITIALIZERS126(name) INITIALIZERS125(name), LIST_INITIALIZER(name[125])
+#define INITIALIZERS127(name) INITIALIZERS126(name), LIST_INITIALIZER(name[126])
+#define INITIALIZERS128(name) INITIALIZERS127(name), LIST_INITIALIZER(name[127])
+#define INITIALIZERS129(name) INITIALIZERS128(name), LIST_INITIALIZER(name[128])
+#define INITIALIZERS130(name) INITIALIZERS129(name), LIST_INITIALIZER(name[129])
+#define INITIALIZERS131(name) INITIALIZERS130(name), LIST_INITIALIZER(name[130])
+#define INITIALIZERS132(name) INITIALIZERS131(name), LIST_INITIALIZER(name[131])
+#define INITIALIZERS133(name) INITIALIZERS132(name), LIST_INITIALIZER(name[132])
+#define INITIALIZERS134(name) INITIALIZERS133(name), LIST_INITIALIZER(name[133])
+#define INITIALIZERS135(name) INITIALIZERS134(name), LIST_INITIALIZER(name[134])
+#define INITIALIZERS136(name) INITIALIZERS135(name), LIST_INITIALIZER(name[135])
+#define INITIALIZERS137(name) INITIALIZERS136(name), LIST_INITIALIZER(name[136])
+#define INITIALIZERS138(name) INITIALIZERS137(name), LIST_INITIALIZER(name[137])
+#define INITIALIZERS139(name) INITIALIZERS138(name), LIST_INITIALIZER(name[138])
+#define INITIALIZERS140(name) INITIALIZERS139(name), LIST_INITIALIZER(name[139])
+#define INITIALIZERS141(name) INITIALIZERS140(name), LIST_INITIALIZER(name[140])
+#define INITIALIZERS142(name) INITIALIZERS141(name), LIST_INITIALIZER(name[141])
+#define INITIALIZERS143(name) INITIALIZERS142(name), LIST_INITIALIZER(name[142])
+#define INITIALIZERS144(name) INITIALIZERS143(name), LIST_INITIALIZER(name[143])
+#define INITIALIZERS145(name) INITIALIZERS144(name), LIST_INITIALIZER(name[144])
+#define INITIALIZERS146(name) INITIALIZERS145(name), LIST_INITIALIZER(name[145])
+#define INITIALIZERS147(name) INITIALIZERS146(name), LIST_INITIALIZER(name[146])
+#define INITIALIZERS148(name) INITIALIZERS147(name), LIST_INITIALIZER(name[147])
+#define INITIALIZERS149(name) INITIALIZERS148(name), LIST_INITIALIZER(name[148])
+#define INITIALIZERS150(name) INITIALIZERS149(name), LIST_INITIALIZER(name[149])
+#define INITIALIZERS151(name) INITIALIZERS150(name), LIST_INITIALIZER(name[150])
+#define INITIALIZERS152(name) INITIALIZERS151(name), LIST_INITIALIZER(name[151])
+#define INITIALIZERS153(name) INITIALIZERS152(name), LIST_INITIALIZER(name[152])
+#define INITIALIZERS154(name) INITIALIZERS153(name), LIST_INITIALIZER(name[153])
+#define INITIALIZERS155(name) INITIALIZERS154(name), LIST_INITIALIZER(name[154])
+#define INITIALIZERS156(name) INITIALIZERS155(name), LIST_INITIALIZER(name[155])
+#define INITIALIZERS157(name) INITIALIZERS156(name), LIST_INITIALIZER(name[156])
+#define INITIALIZERS158(name) INITIALIZERS157(name), LIST_INITIALIZER(name[157])
+#define INITIALIZERS159(name) INITIALIZERS158(name), LIST_INITIALIZER(name[158])
+#define INITIALIZERS160(name) INITIALIZERS159(name), LIST_INITIALIZER(name[159])
+#define INITIALIZERS161(name) INITIALIZERS160(name), LIST_INITIALIZER(name[160])
+#define INITIALIZERS162(name) INITIALIZERS161(name), LIST_INITIALIZER(name[161])
+#define INITIALIZERS163(name) INITIALIZERS162(name), LIST_INITIALIZER(name[162])
+#define INITIALIZERS164(name) INITIALIZERS163(name), LIST_INITIALIZER(name[163])
+#define INITIALIZERS165(name) INITIALIZERS164(name), LIST_INITIALIZER(name[164])
+#define INITIALIZERS166(name) INITIALIZERS165(name), LIST_INITIALIZER(name[165])
+#define INITIALIZERS167(name) INITIALIZERS166(name), LIST_INITIALIZER(name[166])
+#define INITIALIZERS168(name) INITIALIZERS167(name), LIST_INITIALIZER(name[167])
+#define INITIALIZERS169(name) INITIALIZERS168(name), LIST_INITIALIZER(name[168])
+#define INITIALIZERS170(name) INITIALIZERS169(name), LIST_INITIALIZER(name[169])
+#define INITIALIZERS171(name) INITIALIZERS170(name), LIST_INITIALIZER(name[170])
+#define INITIALIZERS172(name) INITIALIZERS171(name), LIST_INITIALIZER(name[171])
+#define INITIALIZERS173(name) INITIALIZERS172(name), LIST_INITIALIZER(name[172])
+#define INITIALIZERS174(name) INITIALIZERS173(name), LIST_INITIALIZER(name[173])
+#define INITIALIZERS175(name) INITIALIZERS174(name), LIST_INITIALIZER(name[174])
+#define INITIALIZERS176(name) INITIALIZERS175(name), LIST_INITIALIZER(name[175])
+#define INITIALIZERS177(name) INITIALIZERS176(name), LIST_INITIALIZER(name[176])
+#define INITIALIZERS178(name) INITIALIZERS177(name), LIST_INITIALIZER(name[177])
+#define INITIALIZERS179(name) INITIALIZERS178(name), LIST_INITIALIZER(name[178])
+#define INITIALIZERS180(name) INITIALIZERS179(name), LIST_INITIALIZER(name[179])
+#define INITIALIZERS181(name) INITIALIZERS180(name), LIST_INITIALIZER(name[180])
+#define INITIALIZERS182(name) INITIALIZERS181(name), LIST_INITIALIZER(name[181])
+#define INITIALIZERS183(name) INITIALIZERS182(name), LIST_INITIALIZER(name[182])
+#define INITIALIZERS184(name) INITIALIZERS183(name), LIST_INITIALIZER(name[183])
+#define INITIALIZERS185(name) INITIALIZERS184(name), LIST_INITIALIZER(name[184])
+#define INITIALIZERS186(name) INITIALIZERS185(name), LIST_INITIALIZER(name[185])
+#define INITIALIZERS187(name) INITIALIZERS186(name), LIST_INITIALIZER(name[186])
+#define INITIALIZERS188(name) INITIALIZERS187(name), LIST_INITIALIZER(name[187])
+#define INITIALIZERS189(name) INITIALIZERS188(name), LIST_INITIALIZER(name[188])
+#define INITIALIZERS190(name) INITIALIZERS189(name), LIST_INITIALIZER(name[189])
+#define INITIALIZERS191(name) INITIALIZERS190(name), LIST_INITIALIZER(name[190])
+#define INITIALIZERS192(name) INITIALIZERS191(name), LIST_INITIALIZER(name[191])
+#define INITIALIZERS193(name) INITIALIZERS192(name), LIST_INITIALIZER(name[192])
+#define INITIALIZERS194(name) INITIALIZERS193(name), LIST_INITIALIZER(name[193])
+#define INITIALIZERS195(name) INITIALIZERS194(name), LIST_INITIALIZER(name[194])
+#define INITIALIZERS196(name) INITIALIZERS195(name), LIST_INITIALIZER(name[195])
+#define INITIALIZERS197(name) INITIALIZERS196(name), LIST_INITIALIZER(name[196])
+#define INITIALIZERS198(name) INITIALIZERS197(name), LIST_INITIALIZER(name[197])
+#define INITIALIZERS199(name) INITIALIZERS198(name), LIST_INITIALIZER(name[198])
+#define INITIALIZERS200(name) INITIALIZERS199(name), LIST_INITIALIZER(name[199])
+#define INITIALIZERS201(name) INITIALIZERS200(name), LIST_INITIALIZER(name[200])
+#define INITIALIZERS202(name) INITIALIZERS201(name), LIST_INITIALIZER(name[201])
+#define INITIALIZERS203(name) INITIALIZERS202(name), LIST_INITIALIZER(name[202])
+#define INITIALIZERS204(name) INITIALIZERS203(name), LIST_INITIALIZER(name[203])
+#define INITIALIZERS205(name) INITIALIZERS204(name), LIST_INITIALIZER(name[204])
+#define INITIALIZERS206(name) INITIALIZERS205(name), LIST_INITIALIZER(name[205])
+#define INITIALIZERS207(name) INITIALIZERS206(name), LIST_INITIALIZER(name[206])
+#define INITIALIZERS208(name) INITIALIZERS207(name), LIST_INITIALIZER(name[207])
+#define INITIALIZERS209(name) INITIALIZERS208(name), LIST_INITIALIZER(name[208])
+#define INITIALIZERS210(name) INITIALIZERS209(name), LIST_INITIALIZER(name[209])
+#define INITIALIZERS211(name) INITIALIZERS210(name), LIST_INITIALIZER(name[210])
+#define INITIALIZERS212(name) INITIALIZERS211(name), LIST_INITIALIZER(name[211])
+#define INITIALIZERS213(name) INITIALIZERS212(name), LIST_INITIALIZER(name[212])
+#define INITIALIZERS214(name) INITIALIZERS213(name), LIST_INITIALIZER(name[213])
+#define INITIALIZERS215(name) INITIALIZERS214(name), LIST_INITIALIZER(name[214])
+#define INITIALIZERS216(name) INITIALIZERS215(name), LIST_INITIALIZER(name[215])
+#define INITIALIZERS217(name) INITIALIZERS216(name), LIST_INITIALIZER(name[216])
+#define INITIALIZERS218(name) INITIALIZERS217(name), LIST_INITIALIZER(name[217])
+#define INITIALIZERS219(name) INITIALIZERS218(name), LIST_INITIALIZER(name[218])
+#define INITIALIZERS220(name) INITIALIZERS219(name), LIST_INITIALIZER(name[219])
+#define INITIALIZERS221(name) INITIALIZERS220(name), LIST_INITIALIZER(name[220])
+#define INITIALIZERS222(name) INITIALIZERS221(name), LIST_INITIALIZER(name[221])
+#define INITIALIZERS223(name) INITIALIZERS222(name), LIST_INITIALIZER(name[222])
+#define INITIALIZERS224(name) INITIALIZERS223(name), LIST_INITIALIZER(name[223])
+#define INITIALIZERS225(name) INITIALIZERS224(name), LIST_INITIALIZER(name[224])
+#define INITIALIZERS226(name) INITIALIZERS225(name), LIST_INITIALIZER(name[225])
+#define INITIALIZERS227(name) INITIALIZERS226(name), LIST_INITIALIZER(name[226])
+#define INITIALIZERS228(name) INITIALIZERS227(name), LIST_INITIALIZER(name[227])
+#define INITIALIZERS229(name) INITIALIZERS228(name), LIST_INITIALIZER(name[228])
+#define INITIALIZERS230(name) INITIALIZERS229(name), LIST_INITIALIZER(name[229])
+#define INITIALIZERS231(name) INITIALIZERS230(name), LIST_INITIALIZER(name[230])
+#define INITIALIZERS232(name) INITIALIZERS231(name), LIST_INITIALIZER(name[231])
+#define INITIALIZERS233(name) INITIALIZERS232(name), LIST_INITIALIZER(name[232])
+#define INITIALIZERS234(name) INITIALIZERS233(name), LIST_INITIALIZER(name[233])
+#define INITIALIZERS235(name) INITIALIZERS234(name), LIST_INITIALIZER(name[234])
+#define INITIALIZERS236(name) INITIALIZERS235(name), LIST_INITIALIZER(name[235])
+#define INITIALIZERS237(name) INITIALIZERS236(name), LIST_INITIALIZER(name[236])
+#define INITIALIZERS238(name) INITIALIZERS237(name), LIST_INITIALIZER(name[237])
+#define INITIALIZERS239(name) INITIALIZERS238(name), LIST_INITIALIZER(name[238])
+#define INITIALIZERS240(name) INITIALIZERS239(name), LIST_INITIALIZER(name[239])
+#define INITIALIZERS241(name) INITIALIZERS240(name), LIST_INITIALIZER(name[240])
+#define INITIALIZERS242(name) INITIALIZERS241(name), LIST_INITIALIZER(name[241])
+#define INITIALIZERS243(name) INITIALIZERS242(name), LIST_INITIALIZER(name[242])
+#define INITIALIZERS244(name) INITIALIZERS243(name), LIST_INITIALIZER(name[243])
+#define INITIALIZERS245(name) INITIALIZERS244(name), LIST_INITIALIZER(name[244])
+#define INITIALIZERS246(name) INITIALIZERS245(name), LIST_INITIALIZER(name[245])
+#define INITIALIZERS247(name) INITIALIZERS246(name), LIST_INITIALIZER(name[246])
+#define INITIALIZERS248(name) INITIALIZERS247(name), LIST_INITIALIZER(name[247])
+#define INITIALIZERS249(name) INITIALIZERS248(name), LIST_INITIALIZER(name[248])
+#define INITIALIZERS250(name) INITIALIZERS249(name), LIST_INITIALIZER(name[249])
+#define INITIALIZERS251(name) INITIALIZERS250(name), LIST_INITIALIZER(name[250])
+#define INITIALIZERS252(name) INITIALIZERS251(name), LIST_INITIALIZER(name[251])
+#define INITIALIZERS253(name) INITIALIZERS252(name), LIST_INITIALIZER(name[252])
+#define INITIALIZERS254(name) INITIALIZERS253(name), LIST_INITIALIZER(name[253])
+#define INITIALIZERS255(name) INITIALIZERS254(name), LIST_INITIALIZER(name[254])
+#define INITIALIZERS256(name) INITIALIZERS255(name), LIST_INITIALIZER(name[255])
+
+#define LIST_INITIALIZER(name) { &name, &name }
+#define DECLARE_LIST(name) list_entry_t name = LIST_INITIALIZER(name)
+#define DECLARE_LIST_ARRAY(name, size) list_entry_t name[size] = { INITIALIZERS##size(name) }
+
+#define list_put_after  list_prepend
+#define list_put_before list_append
+
+typedef struct _list_entry_t
+{
+    struct _list_entry_t *next, *prev;
+} list_entry_t;
+
+static inline void list_prepend(list_entry_t *list, list_entry_t *entry)
+{
+    entry->next = list->next;
+    entry->prev = list;
+    entry->next->prev = entry;
+    entry->prev->next = entry;
+}
+
+static inline void list_append(list_entry_t *list, list_entry_t *entry)
+{
+    entry->next = list;
+    entry->prev = list->prev;
+    entry->next->prev = entry;
+    entry->prev->next = entry;
+}
+
+static inline void list_remove(list_entry_t *entry)
+{
+    entry->next->prev = entry->prev;
+    entry->prev->next = entry->next;
+}
+
+static inline void list_init(list_entry_t *list)
+{
+    list->next = list->prev = list;
+}
+
+#endif
index 71c49e880f4796b0a4c13f52773b5fbb85c1fe72..784d0d633d29189e85bb07c858accc00dadb2740 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "clock.h"
 #include "defs.h"
+#include "device.h"
+#include "filesystem.h"
+#include "list.h"
+#include "object.h"
 #include "process.h"
 #include "syscalls.h"