From 3c6a07b0c6be043bbf516995ba61bb33121b1835 Mon Sep 17 00:00:00 2001 From: ryuz Date: Wed, 26 Dec 2007 17:04:35 +0000 Subject: [PATCH] (none) --- aplfw/build/win/win32/vc60/hosaplfw.dsp | 282 ++++++++++++++++++----- aplfw/driver/console/vt100/vt100drv_destructor.c | 2 +- aplfw/driver/console/vt100/vt100drv_local.h | 2 +- aplfw/driver/serial/winsock/winsockdrv.c | 69 +++++- aplfw/driver/serial/winsock/winsockdrv.h | 4 +- aplfw/driver/serial/winsock/winsockdrv_local.h | 5 +- aplfw/sample/win/win32/boot_task.c | 1 + aplfw/sample/win/win32/boot_task.h | 12 +- aplfw/sample/win/win32/sample.c | 95 -------- aplfw/sample/win/win32/sample.h | 33 --- aplfw/sample/win/win32/system.cfg | 7 +- aplfw/sample/win/win32/vc60/sample.dsp | 16 +- kernel/build/sh/sh2/gcc/gmake.mak | 4 + kernel/build/sh/sh2/shc/gmake.mak | 2 +- kernel/build/win/win32/vc60/hosv4a.dsp | 36 +++ 15 files changed, 351 insertions(+), 219 deletions(-) delete mode 100755 aplfw/sample/win/win32/sample.c delete mode 100755 aplfw/sample/win/win32/sample.h diff --git a/aplfw/build/win/win32/vc60/hosaplfw.dsp b/aplfw/build/win/win32/vc60/hosaplfw.dsp index c65548a..2a663d7 100755 --- a/aplfw/build/win/win32/vc60/hosaplfw.dsp +++ b/aplfw/build/win/win32/vc60/hosaplfw.dsp @@ -391,6 +391,10 @@ SOURCE=..\..\..\..\driver\console\vt100\vt100drv_close.c # End Source File # Begin Source File +SOURCE=..\..\..\..\driver\console\vt100\vt100drv_constructor.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\driver\console\vt100\vt100drv_create.c # End Source File # Begin Source File @@ -399,6 +403,10 @@ SOURCE=..\..\..\..\driver\console\vt100\vt100drv_delete.c # End Source File # Begin Source File +SOURCE=..\..\..\..\driver\console\vt100\vt100drv_destructor.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\driver\console\vt100\vt100drv_flush.c # End Source File # Begin Source File @@ -464,6 +472,10 @@ SOURCE=..\..\..\..\system\sysapi\sysapi_local.h # End Source File # Begin Source File +SOURCE=..\..\..\..\system\sysapi\sysctx_isisr.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\system\sysapi\sysevt_clear.c # End Source File # Begin Source File @@ -556,72 +568,36 @@ SOURCE=..\..\..\..\system\sysapi\sysprc_delete.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\sysapi\sysprc_exit.c -# End Source File -# Begin Source File - SOURCE=..\..\..\..\system\sysapi\sysprc_getcurrenthandle.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\sysapi\sysprc_start.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\system\sysapi\systim_wait.c -# End Source File -# End Group -# Begin Group "file" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\..\system\file\chrdrv.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\system\file\chrdrv_create.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\system\file\chrdrv_delete.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\system\file\chrdrv_iocontrol.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\system\file\chrdrv_local.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\system\file\chrdrv_setreadsignal.c +SOURCE=..\..\..\..\system\sysapi\sysprc_getparam.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\file\chrdrv_setwritesignal.c +SOURCE=..\..\..\..\system\sysapi\sysprc_resume.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\file\chrdrv_waitreadsignal.c +SOURCE=..\..\..\..\system\sysapi\sysprc_suspend.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\file\chrdrv_waitwritesignal.c +SOURCE=..\..\..\..\system\sysapi\sysprc_terminate.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\file\chrfile.h +SOURCE=..\..\..\..\system\sysapi\systim_getsystemtime.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\file\chrfile_create.c +SOURCE=..\..\..\..\system\sysapi\systim_wait.c # End Source File -# Begin Source File +# End Group +# Begin Group "file" -SOURCE=..\..\..\..\system\file\chrfile_delete.c -# End Source File +# PROP Default_Filter "" # Begin Source File SOURCE=..\..\..\..\system\file\console.h @@ -636,11 +612,11 @@ SOURCE=..\..\..\..\system\file\drvobj_close.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\file\drvobj_create.c +SOURCE=..\..\..\..\system\file\drvobj_constructor.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\file\drvobj_delete.c +SOURCE=..\..\..\..\system\file\drvobj_destructor.c # End Source File # Begin Source File @@ -744,6 +720,10 @@ SOURCE=..\..\..\..\system\file\fileobj.h # End Source File # Begin Source File +SOURCE=..\..\..\..\system\file\fileobj_constructor.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\system\file\fileobj_create.c # End Source File # Begin Source File @@ -752,6 +732,10 @@ SOURCE=..\..\..\..\system\file\fileobj_delete.c # End Source File # Begin Source File +SOURCE=..\..\..\..\system\file\fileobj_destructor.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\system\file\fileobj_local.h # End Source File # Begin Source File @@ -764,6 +748,66 @@ SOURCE=..\..\..\..\system\file\stdfile.h # End Source File # Begin Source File +SOURCE=..\..\..\..\system\file\syncdrv.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncdrv_constructor.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncdrv_destructor.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncdrv_endprocess.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncdrv_iocontrol.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncdrv_local.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncdrv_sendsignal.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncdrv_startprocess.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncfile_constructor.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncfile_create.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncfile_delete.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncfile_destructor.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncfile_local.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\syncfile_setsignal.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\system\file\sysvol.h # End Source File # Begin Source File @@ -776,6 +820,10 @@ SOURCE=..\..\..\..\system\file\sysvol_close.c # End Source File # Begin Source File +SOURCE=..\..\..\..\system\file\sysvol_constructor.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\system\file\sysvol_create.c # End Source File # Begin Source File @@ -784,6 +832,10 @@ SOURCE=..\..\..\..\system\file\sysvol_delete.c # End Source File # Begin Source File +SOURCE=..\..\..\..\system\file\sysvol_destructor.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\system\file\sysvol_iocontrol.c # End Source File # Begin Source File @@ -796,6 +848,30 @@ SOURCE=..\..\..\..\system\file\sysvol_open.c # End Source File # Begin Source File +SOURCE=..\..\..\..\system\file\sysvolfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\sysvolfile_constructor.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\sysvolfile_create.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\sysvolfile_delete.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\sysvolfile_destructor.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\sysvolfile_local.h +# End Source File +# Begin Source File + SOURCE=..\..\..\..\system\file\volume.h # End Source File # Begin Source File @@ -804,10 +880,26 @@ SOURCE=..\..\..\..\system\file\volumeobj.h # End Source File # Begin Source File +SOURCE=..\..\..\..\system\file\volumeobj_constructor.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\system\file\volumeobj_create.c # End Source File # Begin Source File +SOURCE=..\..\..\..\system\file\volumeobj_delete.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\volumeobj_destructor.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\file\volumeobj_local.h +# End Source File +# Begin Source File + SOURCE=..\..\..\..\system\file\volumeobj_makedir.c # End Source File # Begin Source File @@ -844,12 +936,24 @@ SOURCE=..\..\..\..\system\handle\handleobj.h # End Source File # Begin Source File +SOURCE=..\..\..\..\system\handle\handleobj_constructor.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\system\handle\handleobj_create.c # End Source File # Begin Source File SOURCE=..\..\..\..\system\handle\handleobj_delete.c # End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\handle\handleobj_destructor.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\handle\handleobj_local.h +# End Source File # End Group # Begin Group "shell" @@ -868,19 +972,91 @@ SOURCE=..\..\..\..\system\shell\shell.h # PROP Default_Filter "" # Begin Source File -SOURCE=..\..\..\..\system\process\process.c +SOURCE=..\..\..\..\system\process\process.h # End Source File # Begin Source File -SOURCE=..\..\..\..\system\process\process.h +SOURCE=..\..\..\..\system\process\process_constructor.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_create.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_delete.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\process\procobj.c +SOURCE=..\..\..\..\system\process\process_destructor.c # End Source File # Begin Source File -SOURCE=..\..\..\..\system\process\procobj.h +SOURCE=..\..\..\..\system\process\process_exit.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_getconsole.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_getcurrentdir.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_getcurrenthandle.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_getexitcode.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_getstderr.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_getstdin.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_getstdout.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_getterminal.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_local.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_setconsole.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_setcurrentdir.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_setstderr.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_setstdin.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_setstdout.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_setterminal.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\system\process\process_waitexit.c # End Source File # End Group # Begin Group "type" @@ -900,10 +1076,6 @@ SOURCE=..\..\..\..\system\system\system.h # End Source File # Begin Source File -SOURCE=..\..\..\..\system\system\system_boot.c -# End Source File -# Begin Source File - SOURCE=..\..\..\..\system\system\system_initialize.c # End Source File # Begin Source File diff --git a/aplfw/driver/console/vt100/vt100drv_destructor.c b/aplfw/driver/console/vt100/vt100drv_destructor.c index 2183cd5..f5b9332 100755 --- a/aplfw/driver/console/vt100/vt100drv_destructor.c +++ b/aplfw/driver/console/vt100/vt100drv_destructor.c @@ -17,7 +17,7 @@ void Vt100Drv_Destructor(C_VT100DRV *self) { /* 親クラスデストラクタ */ - DrvObj_Destructor(self->DrvObj); + DrvObj_Destructor(&self->DrvObj); } diff --git a/aplfw/driver/console/vt100/vt100drv_local.h b/aplfw/driver/console/vt100/vt100drv_local.h index 292e749..d9fc4af 100755 --- a/aplfw/driver/console/vt100/vt100drv_local.h +++ b/aplfw/driver/console/vt100/vt100drv_local.h @@ -1,7 +1,7 @@ #include "vt100drv.h" - +#include "system/file/drvobj_local.h" #define VT100DRV_ESC_IDLE 0 #define VT100DRV_ESC_ESC1 1 diff --git a/aplfw/driver/serial/winsock/winsockdrv.c b/aplfw/driver/serial/winsock/winsockdrv.c index da80c55..6e4601f 100755 --- a/aplfw/driver/serial/winsock/winsockdrv.c +++ b/aplfw/driver/serial/winsock/winsockdrv.c @@ -6,7 +6,7 @@ const T_DRVOBJ_METHODS WinSockDrv_Methods = { - WinSockDrv_Delete, + { WinSockDrv_Delete }, WinSockDrv_Open, WinSockDrv_Close, WinSockDrv_IoControl, @@ -18,14 +18,41 @@ const T_DRVOBJ_METHODS WinSockDrv_Methods = /** コンストラクタ */ -void WinSockDrv_Create(C_WINSOCKDRV *self, int iPortNum, int iIntNum, int iBufSize) +HANDLE WinSockDrv_Create(int iPortNum, int iIntNum, int iBufSize) { - WSADATA wsaData; - struct sockaddr_in addr; + C_WINSOCKDRV *self; + + /* メモリ確保 */ + if ( (self = (C_WINSOCKDRV *)SysMem_Alloc(sizeof(C_WINSOCKDRV))) == NULL ) + { + return HANDLE_NULL; + } + + /* コンストラクタ呼び出し */ + if ( WinSockDrv_Constructor(self, NULL, iPortNum, iIntNum, iBufSize) != FILE_ERR_OK ) + { + SysMem_Free(self); + return HANDLE_NULL; + } - /* 親クラス初期化 */ - DrvObj_Create(&self->DrvObj, &WinSockDrv_Methods); + return (HANDLE)self; +} + + +/** コンストラクタ */ +FILE_ERR WinSockDrv_Constructor(C_WINSOCKDRV *self, const T_DRVOBJ_METHODS *pMethods, int iPortNum, int iIntNum, int iBufSize) +{ + WSADATA wsaData; + struct sockaddr_in addr; + if ( pMethods == NULL ) + { + pMethods = &WinSockDrv_Methods; + } + + /* 親クラスコンストラクタ呼び出し */ + DrvObj_Constructor(&self->DrvObj, pMethods); + WSAStartup(MAKEWORD(2,0), &wsaData); self->sock0 = socket(AF_INET, SOCK_STREAM, 0); @@ -37,13 +64,34 @@ void WinSockDrv_Create(C_WINSOCKDRV *self, int iPortNum, int iIntNum, int iBufSi bind(self->sock0, (struct sockaddr *)&addr, sizeof(addr)); listen(self->sock0, 5); + + return FILE_ERR_OK; +} + + +/** 削除 */ +void WinSockDrv_Delete(HANDLE hDriver) +{ + C_WINSOCKDRV *self; + + /* upper cast */ + self = (C_WINSOCKDRV *)hDriver; + + /* デストラクタ呼び出し */ + WinSockDrv_Destructor(self); + + /* メモリ削除 */ + SysMem_Free(self); } /** デストラクタ */ -void WinSockDrv_Delete(C_DRVOBJ *pDrvObj) +void WinSockDrv_Destructor(C_WINSOCKDRV *self) { WSACleanup(); + + /* 親クラスデストラクタ */ + DrvObj_Destructor(&self->DrvObj); } @@ -51,7 +99,7 @@ void WinSockDrv_Delete(C_DRVOBJ *pDrvObj) HANDLE WinSockDrv_Open(C_DRVOBJ *pDrvObj, const char *pszPath, int iMode) { C_WINSOCKDRV *self; - C_FILEOBJ *pFileObj; + HANDLE hFile; struct sockaddr_in client; int len; @@ -59,11 +107,10 @@ HANDLE WinSockDrv_Open(C_DRVOBJ *pDrvObj, const char *pszPath, int iMode) self = (C_WINSOCKDRV *)pDrvObj; /* create file descriptor */ - if ( (pFileObj = SysMem_Alloc(sizeof(*pFileObj))) == NULL ) + if ( (hFile = FileObj_Create(pDrvObj)) == HANDLE_NULL ) { return HANDLE_NULL; } - FileObj_Create(pFileObj, pDrvObj, NULL); /* オープン処理 */ if ( self->iOpenCount++ == 0 ) @@ -72,7 +119,7 @@ HANDLE WinSockDrv_Open(C_DRVOBJ *pDrvObj, const char *pszPath, int iMode) self->sock = accept(self->sock0, (struct sockaddr *)&client, &len); } - return (HANDLE)pFileObj; + return hFile; } diff --git a/aplfw/driver/serial/winsock/winsockdrv.h b/aplfw/driver/serial/winsock/winsockdrv.h index f77efa7..4e23a24 100755 --- a/aplfw/driver/serial/winsock/winsockdrv.h +++ b/aplfw/driver/serial/winsock/winsockdrv.h @@ -43,8 +43,8 @@ typedef struct c_winsockdrv extern "C" { #endif -void WinSockDrv_Create(C_WINSOCKDRV *self, int iPortNum, int iIntNum, int iBufSize); /**< コンストラクタ */ -void WinSockDrv_Delete(C_DRVOBJ *pDrvObj); /**< デストラクタ */ +HANDLE WinSockDrv_Create(int iPortNum, int iIntNum, int iBufSize); /**< 生成 */ +void WinSockDrv_Delete(HANDLE hDriver); /**< 削除 */ #ifdef __cplusplus } diff --git a/aplfw/driver/serial/winsock/winsockdrv_local.h b/aplfw/driver/serial/winsock/winsockdrv_local.h index 0dc5257..dca0543 100755 --- a/aplfw/driver/serial/winsock/winsockdrv_local.h +++ b/aplfw/driver/serial/winsock/winsockdrv_local.h @@ -14,12 +14,15 @@ #include "winsockdrv.h" - +#include "system/file/drvobj_local.h" #ifdef __cplusplus extern "C" { #endif +FILE_ERR WinSockDrv_Constructor(C_WINSOCKDRV *self, const T_DRVOBJ_METHODS *pMethods, int iPortNum, int iIntNum, int iBufSize); /** コンストラクタ */ +void WinSockDrv_Destructor(C_WINSOCKDRV *self); /** デストラクタ */ + HANDLE WinSockDrv_Open(C_DRVOBJ *pDrvObj, const char *pszPath, int iMode); FILE_ERR WinSockDrv_Close(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj); FILE_ERR WinSockDrv_IoControl(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj, int iFunc, void *pInBuf, FILE_SIZE InSize, const void *pOutBuf, FILE_SIZE OutSize); diff --git a/aplfw/sample/win/win32/boot_task.c b/aplfw/sample/win/win32/boot_task.c index dc3bb61..0f52857 100755 --- a/aplfw/sample/win/win32/boot_task.c +++ b/aplfw/sample/win/win32/boot_task.c @@ -15,6 +15,7 @@ #include #include "kernel.h" #include "kernel_id.h" +#include "hosaplfw.h" #include "system/system/system.h" #include "system/sysapi/sysapi.h" #include "system/file/file.h" diff --git a/aplfw/sample/win/win32/boot_task.h b/aplfw/sample/win/win32/boot_task.h index dcf6c17..e4f9e37 100755 --- a/aplfw/sample/win/win32/boot_task.h +++ b/aplfw/sample/win/win32/boot_task.h @@ -1,7 +1,7 @@ /** * Sample program for Hyper Operating System V4 Advance * - * @file sample.c + * @file boot_task.c * @brief %jp{サンプルプログラム}%en{Sample program} * * Copyright (C) 1998-2006 by Project HOS @@ -10,24 +10,22 @@ -#ifndef __sample_h__ -#define __sample_h__ +#ifndef __boot_task_h__ +#define __boot_task_h__ #ifdef __cplusplus extern "C" { #endif -void Sample_Initialize(VP_INT exinf); -void Sample_Startup(VP_INT exinf); -void Sample_Task(VP_INT exinf); +void Boot_Task(VP_INT exinf); #ifdef __cplusplus } #endif -#endif /* __sample_h__ */ +#endif /* ___boot_task_h__ */ /* end of file */ diff --git a/aplfw/sample/win/win32/sample.c b/aplfw/sample/win/win32/sample.c deleted file mode 100755 index 0332aee..0000000 --- a/aplfw/sample/win/win32/sample.c +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Sample program for Hyper Operating System V4 Advance - * - * @file sample.c - * @brief %jp{サンプルプログラム}%en{Sample program} - * - * Copyright (C) 1998-2007 by Project HOS - * http://sourceforge.jp/projects/hos/ - */ - - - -#include -#include -#include -#include "kernel.h" -#include "kernel_id.h" -#include "system/system/system.h" -#include "system/sysapi/sysapi.h" -#include "system/file/file.h" -#include "system/file/console.h" -#include "system/process/process.h" -#include "system/command/command.h" -#include "system/shell/shell.h" -#include "driver/serial/winsock/winsockdrv.h" -#include "driver/console/vt100/vt100drv.h" -#include "application/example/hello/hello.h" - - -long g_SystemHeap[8 * 1024 / sizeof(long)]; -C_WINSOCKDRV g_WinSockDrv[1]; -C_VT100DRV g_Vt100Drv[1]; - - - -/** %jp{初期化ハンドラ} */ -void Sample_Initialize(VP_INT exinf) -{ -} - -/* 初期化タスク */ -void Sample_Startup(VP_INT exinf) -{ - HANDLE hTty; - HANDLE hCon; - - - /*************************/ - /* 初期化 */ - /*************************/ - - /* システム初期化 */ - System_Initialize(g_SystemHeap, sizeof(g_SystemHeap)); - - - - /*************************/ - /* デバドラ登録 */ - /*************************/ - - /* WinSock用擬似シリアルデバドラ生成 */ - WinSockDrv_Create(&g_WinSockDrv[0], 9997, 1, 64); - - /* /dev/com0 に登録 */ - File_AddDevice("com0", (C_DRVOBJ *)&g_WinSockDrv[0]); - - /* /dev/com0 の上に VT100コンソールを形成 */ - hTty = File_Open("/dev/com0", FILE_OPEN_READ | FILE_OPEN_WRITE); - Vt100Drv_Create(&g_Vt100Drv[0], hTty); - - /* /dev/con0 に登録 */ - File_AddDevice("con0", (C_DRVOBJ *)&g_Vt100Drv[0]); - - /* コンソールを開く */ - hCon = File_Open("/dev/con0", FILE_OPEN_READ | FILE_OPEN_WRITE); - - - /*************************/ - /* コマンド登録 */ - /*************************/ - Command_Initialize(); - Command_AddCommand("hsh", Shell_Main); - Command_AddCommand("hello", Hello_Main); - - - /*************************/ - /* システムプロセス起動 */ - /*************************/ - - System_Boot(hTty, hCon, "hsh", 1024); -} - - - -/* end of file */ diff --git a/aplfw/sample/win/win32/sample.h b/aplfw/sample/win/win32/sample.h deleted file mode 100755 index dcf6c17..0000000 --- a/aplfw/sample/win/win32/sample.h +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Sample program for Hyper Operating System V4 Advance - * - * @file sample.c - * @brief %jp{サンプルプログラム}%en{Sample program} - * - * Copyright (C) 1998-2006 by Project HOS - * http://sourceforge.jp/projects/hos/ - */ - - - -#ifndef __sample_h__ -#define __sample_h__ - - -#ifdef __cplusplus -extern "C" { -#endif - -void Sample_Initialize(VP_INT exinf); -void Sample_Startup(VP_INT exinf); -void Sample_Task(VP_INT exinf); - -#ifdef __cplusplus -} -#endif - - -#endif /* __sample_h__ */ - - -/* end of file */ diff --git a/aplfw/sample/win/win32/system.cfg b/aplfw/sample/win/win32/system.cfg index 5b7f6c0..f1b9ff1 100755 --- a/aplfw/sample/win/win32/system.cfg +++ b/aplfw/sample/win/win32/system.cfg @@ -24,10 +24,9 @@ KERNEL_MAX_ISRID(16); INCLUDE("\"ostimer.h\""); ATT_INI({TA_HLNG, 0, OsTimer_Initialize}); -/* %jp{サンプル}%en{Sample program} */ -INCLUDE("\"sample.h\""); -ATT_INI({TA_HLNG, 0, Sample_Initialize}); -CRE_TSK(TSKID_STARTUP, {TA_HLNG | TA_ACT, 1, Sample_Startup, 1, 1024, NULL}); +/* %jp{ブート}%en{Boot} */ +INCLUDE("\"boot_task.h\""); +CRE_TSK(TSKID_BOOT, {TA_HLNG | TA_ACT, 0, Boot_Task, 2, 1024, NULL}); /* end of file */ diff --git a/aplfw/sample/win/win32/vc60/sample.dsp b/aplfw/sample/win/win32/vc60/sample.dsp index 8022f46..cd2c6ee 100755 --- a/aplfw/sample/win/win32/vc60/sample.dsp +++ b/aplfw/sample/win/win32/vc60/sample.dsp @@ -86,19 +86,23 @@ LINK32=link.exe # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File -SOURCE=..\kernel_cfg.c +SOURCE=..\boot_task.c # End Source File # Begin Source File -SOURCE=..\main.c +SOURCE=..\boot_task.h # End Source File # Begin Source File -SOURCE=..\ostimer.c +SOURCE=..\kernel_cfg.c +# End Source File +# Begin Source File + +SOURCE=..\main.c # End Source File # Begin Source File -SOURCE=..\sample.c +SOURCE=..\ostimer.c # End Source File # Begin Source File @@ -122,10 +126,6 @@ SOURCE=..\ostimer.h # End Source File # Begin Source File -SOURCE=..\sample.h -# End Source File -# Begin Source File - SOURCE=..\wintimer.h # End Source File # End Group diff --git a/kernel/build/sh/sh2/gcc/gmake.mak b/kernel/build/sh/sh2/gcc/gmake.mak index e04ff27..f3e8002 100755 --- a/kernel/build/sh/sh2/gcc/gmake.mak +++ b/kernel/build/sh/sh2/gcc/gmake.mak @@ -347,6 +347,10 @@ clean: makelib_clean make -C $(CFGRTR_DIR) -f gmake.mak TARGET=$(CFGRTR) ARCH_PROC=$(ARCH_PROC) ARCH_IRC=$(ARCH_IRC) clean $(RM) -f *.lst +# depend +.PHONY : depend +depend: makelib_depend + # %jp{gcc用の設定読込み} diff --git a/kernel/build/sh/sh2/shc/gmake.mak b/kernel/build/sh/sh2/shc/gmake.mak index 95be3f3..edd63f5 100755 --- a/kernel/build/sh/sh2/shc/gmake.mak +++ b/kernel/build/sh/sh2/shc/gmake.mak @@ -359,7 +359,7 @@ clean: makelib_clean # depend .PHONY : depend -clean: makelib_depend +clean: makelib_clean # source file copy .PHONY : srccpy diff --git a/kernel/build/win/win32/vc60/hosv4a.dsp b/kernel/build/win/win32/vc60/hosv4a.dsp index 12d1862..3053979 100755 --- a/kernel/build/win/win32/vc60/hosv4a.dsp +++ b/kernel/build/win/win32/vc60/hosv4a.dsp @@ -547,6 +547,10 @@ SOURCE=..\..\..\..\source\object\tsk\iact_tsk.c # End Source File # Begin Source File +SOURCE=..\..\..\..\source\object\tsk\kchg_pri.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\source\object\tsk\kcre_tsk.c # End Source File # Begin Source File @@ -555,6 +559,10 @@ SOURCE=..\..\..\..\source\object\tsk\ref_tsk.c # End Source File # Begin Source File +SOURCE=..\..\..\..\source\object\tsk\ref_tst.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\source\object\tsk\rel_wai.c # End Source File # Begin Source File @@ -915,8 +923,36 @@ SOURCE=..\..\..\..\source\object\cyc\stp_cyc.c # PROP Default_Filter "" # Begin Source File +SOURCE=..\..\..\..\source\object\mtx\acre_mtx.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\object\mtx\cre_mtx.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\object\mtx\del_mtx.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\object\mtx\kadd_mtx.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\object\mtx\kcre_mtx.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\object\mtx\krmv_mtx.c +# End Source File +# Begin Source File + SOURCE=..\..\..\..\source\object\mtx\loc_mtx.c # End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\object\mtx\unl_mtx.c +# End Source File # End Group # End Group # Begin Group "arch" -- 2.11.0