$(OBJS_DIR)/process_exit.$(EXT_OBJ): $(PROCESS_DIR)/process_exit.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/process_waitexit.$(EXT_OBJ): $(PROCESS_DIR)/process_waitexit.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/process_getexitcode.$(EXT_OBJ): $(PROCESS_DIR)/process_getexitcode.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/process_getparam.$(EXT_OBJ): $(PROCESS_DIR)/process_getparam.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/process_setparam.$(EXT_OBJ): $(PROCESS_DIR)/process_setparam.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/process_setcurrentdir.$(EXT_OBJ): $(PROCESS_DIR)/process_setcurrentdir.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/process_getcurrentdir.$(EXT_OBJ): $(PROCESS_DIR)/process_getcurrentdir.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/process_getparentprocess.$(EXT_OBJ): $(PROCESS_DIR)/process_getparentprocess.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/event_create.$(EXT_OBJ): $(EVENT_DIR)/event_create.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/event_delete.$(EXT_OBJ): $(EVENT_DIR)/event_delete.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/event_set.$(EXT_OBJ): $(EVENT_DIR)/event_set.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/event_clear.$(EXT_OBJ): $(EVENT_DIR)/event_clear.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/event_wait.$(EXT_OBJ): $(EVENT_DIR)/event_wait.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/console_getch.$(EXT_OBJ): $(FILE_DIR)/console_getch.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/drvobj_close.$(EXT_OBJ): $(FILE_DIR)/drvobj_close.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/drvobj_read.$(EXT_OBJ): $(FILE_DIR)/drvobj_read.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/drvobj_seek.$(EXT_OBJ): $(FILE_DIR)/drvobj_seek.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/drvobj_write.$(EXT_OBJ): $(FILE_DIR)/drvobj_write.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
-$(OBJS_DIR)/filefmt.$(EXT_OBJ): $(FILE_DIR)/filefmt.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/fileobj_constructor.$(EXT_OBJ): $(FILE_DIR)/fileobj_constructor.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/fileobj_create.$(EXT_OBJ): $(FILE_DIR)/fileobj_create.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/fileobj_delete.$(EXT_OBJ): $(FILE_DIR)/fileobj_delete.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/file_readdir.$(EXT_OBJ): $(FILE_DIR)/file_readdir.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/file_seek.$(EXT_OBJ): $(FILE_DIR)/file_seek.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/file_write.$(EXT_OBJ): $(FILE_DIR)/file_write.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
-$(OBJS_DIR)/stdfile.$(EXT_OBJ): $(FILE_DIR)/stdfile.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/file_printformat.$(EXT_OBJ): $(FILE_DIR)/file_printformat.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/file_printformatv.$(EXT_OBJ): $(FILE_DIR)/file_printformatv.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/stdio_printformat.$(EXT_OBJ): $(FILE_DIR)/stdio_printformat.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/syncdrv_constructor.$(EXT_OBJ): $(FILE_DIR)/syncdrv_constructor.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/syncdrv_destructor.$(EXT_OBJ): $(FILE_DIR)/syncdrv_destructor.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/syncdrv_endprocess.$(EXT_OBJ): $(FILE_DIR)/syncdrv_endprocess.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)/crc16_update.$(EXT_OBJ): $(CRC16_DIR)/crc16_update.c $(COMMON_HEADERS)
$(OBJS_DIR)/crc16_reset.$(EXT_OBJ): $(CRC16_DIR)/crc16_reset.c $(COMMON_HEADERS)
$(OBJS_DIR)/crc16_table.$(EXT_OBJ): $(CRC16_DIR)/crc16_table.c $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_formatstring.$(EXT_OBJ): $(STRINGFORMAT_DIR)/stringformat_formatstring.c $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_formatstringv.$(EXT_OBJ): $(STRINGFORMAT_DIR)/stringformat_formatstringv.c $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_format.$(EXT_OBJ): $(STRINGFORMAT_DIR)/stringformat_format.c $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_formatv.$(EXT_OBJ): $(STRINGFORMAT_DIR)/stringformat_formatv.c $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_string.$(EXT_OBJ): $(STRINGFORMAT_DIR)/stringformat_string.c $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_decimal.$(EXT_OBJ): $(STRINGFORMAT_DIR)/stringformat_decimal.c $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_hexadecimal.$(EXT_OBJ): $(STRINGFORMAT_DIR)/stringformat_hexadecimal.c $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_nibble.$(EXT_OBJ): $(STRINGFORMAT_DIR)/stringformat_nibble.c $(COMMON_HEADERS)
$(OBJS_DIR)/vt100drv_create.$(EXT_OBJ): $(VT100_DIR)/vt100drv_create.c $(COMMON_HEADERS)
$(OBJS_DIR)/vt100drv_delete.$(EXT_OBJ): $(VT100_DIR)/vt100drv_delete.c $(COMMON_HEADERS)
$(OBJS_DIR)/vt100drv_constructor.$(EXT_OBJ): $(VT100_DIR)/vt100drv_constructor.c $(COMMON_HEADERS)
LINK_PACKETBUF ?= Yes
LINK_IPCHECKSUM ?= Yes
LINK_CRC16 ?= Yes
+LINK_STRINGFORMAT ?= Yes
# Device Drivers
LINK_VT100 ?= Yes
CSRCS += $(PROCESS_DIR)/process_exit.c
CSRCS += $(PROCESS_DIR)/process_waitexit.c
CSRCS += $(PROCESS_DIR)/process_getexitcode.c
+CSRCS += $(PROCESS_DIR)/process_getparam.c
+CSRCS += $(PROCESS_DIR)/process_setparam.c
CSRCS += $(PROCESS_DIR)/process_setcurrentdir.c
CSRCS += $(PROCESS_DIR)/process_getcurrentdir.c
CSRCS += $(PROCESS_DIR)/process_getparentprocess.c
CSRCS += $(EVENT_DIR)/event_create.c
CSRCS += $(EVENT_DIR)/event_delete.c
CSRCS += $(EVENT_DIR)/event_set.c
+CSRCS += $(EVENT_DIR)/event_clear.c
CSRCS += $(EVENT_DIR)/event_wait.c
endif
CSRCS += $(FILE_DIR)/drvobj_read.c
CSRCS += $(FILE_DIR)/drvobj_seek.c
CSRCS += $(FILE_DIR)/drvobj_write.c
-CSRCS += $(FILE_DIR)/filefmt.c
CSRCS += $(FILE_DIR)/fileobj_constructor.c
CSRCS += $(FILE_DIR)/fileobj_create.c
CSRCS += $(FILE_DIR)/fileobj_delete.c
CSRCS += $(FILE_DIR)/file_readdir.c
CSRCS += $(FILE_DIR)/file_seek.c
CSRCS += $(FILE_DIR)/file_write.c
-CSRCS += $(FILE_DIR)/stdfile.c
+CSRCS += $(FILE_DIR)/file_printformat.c
+CSRCS += $(FILE_DIR)/file_printformatv.c
+CSRCS += $(FILE_DIR)/stdio_printformat.c
CSRCS += $(FILE_DIR)/syncdrv_constructor.c
CSRCS += $(FILE_DIR)/syncdrv_destructor.c
CSRCS += $(FILE_DIR)/syncdrv_endprocess.c
endif
+# String Format
+ifeq ($(LINK_STRINGFORMAT),Yes)
+STRINGFORMAT_DIR = $(HOSAPLFW_DIR)/library/algorithm/stringformat
+SRC_DIRS += $(STRINGFORMAT_DIR)
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_formatstring.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_formatstringv.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_format.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_formatv.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_string.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_decimal.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_hexadecimal.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_nibble.c
+endif
+
+
# --------------------------------------------------
# Device Drivers
$(OBJS_DIR)\process_getexitcode.c : $(PROCESS_DIR)\process_getexitcode.c
$(CMD_CP) $(PROCESS_DIR)\process_getexitcode.c $(OBJS_DIR)\
+$(OBJS_DIR)\process_getparam.c : $(PROCESS_DIR)\process_getparam.c
+ $(CMD_CP) $(PROCESS_DIR)\process_getparam.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\process_setparam.c : $(PROCESS_DIR)\process_setparam.c
+ $(CMD_CP) $(PROCESS_DIR)\process_setparam.c $(OBJS_DIR)\
+
$(OBJS_DIR)\process_setcurrentdir.c : $(PROCESS_DIR)\process_setcurrentdir.c
$(CMD_CP) $(PROCESS_DIR)\process_setcurrentdir.c $(OBJS_DIR)\
$(OBJS_DIR)\event_set.c : $(EVENT_DIR)\event_set.c
$(CMD_CP) $(EVENT_DIR)\event_set.c $(OBJS_DIR)\
+$(OBJS_DIR)\event_clear.c : $(EVENT_DIR)\event_clear.c
+ $(CMD_CP) $(EVENT_DIR)\event_clear.c $(OBJS_DIR)\
+
$(OBJS_DIR)\event_wait.c : $(EVENT_DIR)\event_wait.c
$(CMD_CP) $(EVENT_DIR)\event_wait.c $(OBJS_DIR)\
$(OBJS_DIR)\drvobj_write.c : $(FILE_DIR)\drvobj_write.c
$(CMD_CP) $(FILE_DIR)\drvobj_write.c $(OBJS_DIR)\
-$(OBJS_DIR)\filefmt.c : $(FILE_DIR)\filefmt.c
- $(CMD_CP) $(FILE_DIR)\filefmt.c $(OBJS_DIR)\
-
$(OBJS_DIR)\fileobj_constructor.c : $(FILE_DIR)\fileobj_constructor.c
$(CMD_CP) $(FILE_DIR)\fileobj_constructor.c $(OBJS_DIR)\
$(OBJS_DIR)\file_write.c : $(FILE_DIR)\file_write.c
$(CMD_CP) $(FILE_DIR)\file_write.c $(OBJS_DIR)\
-$(OBJS_DIR)\stdfile.c : $(FILE_DIR)\stdfile.c
- $(CMD_CP) $(FILE_DIR)\stdfile.c $(OBJS_DIR)\
+$(OBJS_DIR)\file_printformat.c : $(FILE_DIR)\file_printformat.c
+ $(CMD_CP) $(FILE_DIR)\file_printformat.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\file_printformatv.c : $(FILE_DIR)\file_printformatv.c
+ $(CMD_CP) $(FILE_DIR)\file_printformatv.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stdio_printformat.c : $(FILE_DIR)\stdio_printformat.c
+ $(CMD_CP) $(FILE_DIR)\stdio_printformat.c $(OBJS_DIR)\
$(OBJS_DIR)\syncdrv_constructor.c : $(FILE_DIR)\syncdrv_constructor.c
$(CMD_CP) $(FILE_DIR)\syncdrv_constructor.c $(OBJS_DIR)\
$(CMD_CP) $(CRC16_DIR)\crc16_table.c $(OBJS_DIR)\
+$(OBJS_DIR)\stringformat.h : $(STRINGFORMAT_DIR)\stringformat.h
+ $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat.h $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_local.h : $(STRINGFORMAT_DIR)\stringformat_local.h
+ $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_local.h $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_formatstring.c : $(STRINGFORMAT_DIR)\stringformat_formatstring.c
+ $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_formatstring.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_formatstringv.c : $(STRINGFORMAT_DIR)\stringformat_formatstringv.c
+ $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_formatstringv.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_format.c : $(STRINGFORMAT_DIR)\stringformat_format.c
+ $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_format.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_formatv.c : $(STRINGFORMAT_DIR)\stringformat_formatv.c
+ $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_formatv.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_string.c : $(STRINGFORMAT_DIR)\stringformat_string.c
+ $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_string.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_decimal.c : $(STRINGFORMAT_DIR)\stringformat_decimal.c
+ $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_decimal.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_hexadecimal.c : $(STRINGFORMAT_DIR)\stringformat_hexadecimal.c
+ $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_hexadecimal.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_nibble.c : $(STRINGFORMAT_DIR)\stringformat_nibble.c
+ $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_nibble.c $(OBJS_DIR)\
+
+
$(OBJS_DIR)\vt100drv.h : $(VT100_DIR)\vt100drv.h
$(CMD_CP) $(VT100_DIR)\vt100drv.h $(OBJS_DIR)\
$(OBJS_DIR)\process_exit.$(EXT_OBJ): $(OBJS_DIR)\process_exit.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\process_waitexit.$(EXT_OBJ): $(OBJS_DIR)\process_waitexit.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\process_getexitcode.$(EXT_OBJ): $(OBJS_DIR)\process_getexitcode.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\process_getparam.$(EXT_OBJ): $(OBJS_DIR)\process_getparam.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\process_setparam.$(EXT_OBJ): $(OBJS_DIR)\process_setparam.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\process_setcurrentdir.$(EXT_OBJ): $(OBJS_DIR)\process_setcurrentdir.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\process_getcurrentdir.$(EXT_OBJ): $(OBJS_DIR)\process_getcurrentdir.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\process_getparentprocess.$(EXT_OBJ): $(OBJS_DIR)\process_getparentprocess.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\event_create.$(EXT_OBJ): $(OBJS_DIR)\event_create.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\event_delete.$(EXT_OBJ): $(OBJS_DIR)\event_delete.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\event_set.$(EXT_OBJ): $(OBJS_DIR)\event_set.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\event_clear.$(EXT_OBJ): $(OBJS_DIR)\event_clear.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\event_wait.$(EXT_OBJ): $(OBJS_DIR)\event_wait.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\console_getch.$(EXT_OBJ): $(OBJS_DIR)\console_getch.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\drvobj_read.$(EXT_OBJ): $(OBJS_DIR)\drvobj_read.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\drvobj_seek.$(EXT_OBJ): $(OBJS_DIR)\drvobj_seek.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\drvobj_write.$(EXT_OBJ): $(OBJS_DIR)\drvobj_write.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
-$(OBJS_DIR)\filefmt.$(EXT_OBJ): $(OBJS_DIR)\filefmt.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\fileobj_constructor.$(EXT_OBJ): $(OBJS_DIR)\fileobj_constructor.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\fileobj_create.$(EXT_OBJ): $(OBJS_DIR)\fileobj_create.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\fileobj_delete.$(EXT_OBJ): $(OBJS_DIR)\fileobj_delete.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\file_readdir.$(EXT_OBJ): $(OBJS_DIR)\file_readdir.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\file_seek.$(EXT_OBJ): $(OBJS_DIR)\file_seek.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\file_write.$(EXT_OBJ): $(OBJS_DIR)\file_write.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
-$(OBJS_DIR)\stdfile.$(EXT_OBJ): $(OBJS_DIR)\stdfile.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\file_printformat.$(EXT_OBJ): $(OBJS_DIR)\file_printformat.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\file_printformatv.$(EXT_OBJ): $(OBJS_DIR)\file_printformatv.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\stdio_printformat.$(EXT_OBJ): $(OBJS_DIR)\stdio_printformat.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\syncdrv_constructor.$(EXT_OBJ): $(OBJS_DIR)\syncdrv_constructor.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\syncdrv_destructor.$(EXT_OBJ): $(OBJS_DIR)\syncdrv_destructor.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\syncdrv_endprocess.$(EXT_OBJ): $(OBJS_DIR)\syncdrv_endprocess.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
$(OBJS_DIR)\crc16_reset.$(EXT_OBJ): $(OBJS_DIR)\crc16_reset.c $(COMMON_HEADERS)
$(OBJS_DIR)\crc16_table.$(EXT_OBJ): $(OBJS_DIR)\crc16_table.c $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_formatstring.$(EXT_OBJ): $(OBJS_DIR)\stringformat_formatstring.c $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_formatstringv.$(EXT_OBJ): $(OBJS_DIR)\stringformat_formatstringv.c $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_format.$(EXT_OBJ): $(OBJS_DIR)\stringformat_format.c $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_formatv.$(EXT_OBJ): $(OBJS_DIR)\stringformat_formatv.c $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_string.$(EXT_OBJ): $(OBJS_DIR)\stringformat_string.c $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_decimal.$(EXT_OBJ): $(OBJS_DIR)\stringformat_decimal.c $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_hexadecimal.$(EXT_OBJ): $(OBJS_DIR)\stringformat_hexadecimal.c $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_nibble.$(EXT_OBJ): $(OBJS_DIR)\stringformat_nibble.c $(COMMON_HEADERS)
+
$(OBJS_DIR)\vt100drv_create.$(EXT_OBJ): $(OBJS_DIR)\vt100drv_create.c $(COMMON_HEADERS)
$(OBJS_DIR)\vt100drv_delete.$(EXT_OBJ): $(OBJS_DIR)\vt100drv_delete.c $(COMMON_HEADERS)
$(OBJS_DIR)\vt100drv_constructor.$(EXT_OBJ): $(OBJS_DIR)\vt100drv_constructor.c $(COMMON_HEADERS)
!ifndef LINK_CRC16
LINK_CRC16 = Yes
!endif
+!ifndef LINK_STRINGFORMAT
+LINK_STRINGFORMAT = Yes
+!endif
# Device Drivers
!ifndef LINK_VT100
OBJS = $(OBJS) $(OBJS_DIR)\process_waitexit.$(EXT_OBJ)
CSRCS = $(CSRCS) $(PROCESS_DIR)\process_getexitcode.c
OBJS = $(OBJS) $(OBJS_DIR)\process_getexitcode.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(PROCESS_DIR)\process_getparam.c
+OBJS = $(OBJS) $(OBJS_DIR)\process_getparam.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(PROCESS_DIR)\process_setparam.c
+OBJS = $(OBJS) $(OBJS_DIR)\process_setparam.$(EXT_OBJ)
CSRCS = $(CSRCS) $(PROCESS_DIR)\process_setcurrentdir.c
OBJS = $(OBJS) $(OBJS_DIR)\process_setcurrentdir.$(EXT_OBJ)
CSRCS = $(CSRCS) $(PROCESS_DIR)\process_getcurrentdir.c
OBJS = $(OBJS) $(OBJS_DIR)\event_delete.$(EXT_OBJ)
CSRCS = $(CSRCS) $(EVENT_DIR)\event_set.c
OBJS = $(OBJS) $(OBJS_DIR)\event_set.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(EVENT_DIR)\event_clear.c
+OBJS = $(OBJS) $(OBJS_DIR)\event_clear.$(EXT_OBJ)
CSRCS = $(CSRCS) $(EVENT_DIR)\event_wait.c
OBJS = $(OBJS) $(OBJS_DIR)\event_wait.$(EXT_OBJ)
!endif
OBJS = $(OBJS) $(OBJS_DIR)\drvobj_seek.$(EXT_OBJ)
CSRCS = $(CSRCS) $(FILE_DIR)\drvobj_write.c
OBJS = $(OBJS) $(OBJS_DIR)\drvobj_write.$(EXT_OBJ)
-CSRCS = $(CSRCS) $(FILE_DIR)\filefmt.c
-OBJS = $(OBJS) $(OBJS_DIR)\filefmt.$(EXT_OBJ)
CSRCS = $(CSRCS) $(FILE_DIR)\fileobj_constructor.c
OBJS = $(OBJS) $(OBJS_DIR)\fileobj_constructor.$(EXT_OBJ)
CSRCS = $(CSRCS) $(FILE_DIR)\fileobj_create.c
OBJS = $(OBJS) $(OBJS_DIR)\file_seek.$(EXT_OBJ)
CSRCS = $(CSRCS) $(FILE_DIR)\file_write.c
OBJS = $(OBJS) $(OBJS_DIR)\file_write.$(EXT_OBJ)
-CSRCS = $(CSRCS) $(FILE_DIR)\stdfile.c
-OBJS = $(OBJS) $(OBJS_DIR)\stdfile.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(FILE_DIR)\file_printformat.c
+OBJS = $(OBJS) $(OBJS_DIR)\file_printformat.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(FILE_DIR)\file_printformatv.c
+OBJS = $(OBJS) $(OBJS_DIR)\file_printformatv.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(FILE_DIR)\stdio_printformat.c
+OBJS = $(OBJS) $(OBJS_DIR)\stdio_printformat.$(EXT_OBJ)
CSRCS = $(CSRCS) $(FILE_DIR)\syncdrv_constructor.c
OBJS = $(OBJS) $(OBJS_DIR)\syncdrv_constructor.$(EXT_OBJ)
CSRCS = $(CSRCS) $(FILE_DIR)\syncdrv_destructor.c
!endif
+# String Format
+!if "$(LINK_STRINGFORMAT)" == "Yes"
+STRINGFORMAT_DIR = $(HOSAPLFW_DIR)\library\algorithm\stringformat
+HEADERS = $(HEADERS) $(OBJS_DIR)\stringformat.h
+HEADERS = $(HEADERS) $(OBJS_DIR)\stringformat_local.h
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_formatstring.c
+OBJS = $(OBJS) $(OBJS_DIR)\stringformat_formatstring.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_formatstringv.c
+OBJS = $(OBJS) $(OBJS_DIR)\stringformat_formatstringv.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_format.c
+OBJS = $(OBJS) $(OBJS_DIR)\stringformat_format.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_formatv.c
+OBJS = $(OBJS) $(OBJS_DIR)\stringformat_formatv.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_string.c
+OBJS = $(OBJS) $(OBJS_DIR)\stringformat_string.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_decimal.c
+OBJS = $(OBJS) $(OBJS_DIR)\stringformat_decimal.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_hexadecimal.c
+OBJS = $(OBJS) $(OBJS_DIR)\stringformat_hexadecimal.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_nibble.c
+OBJS = $(OBJS) $(OBJS_DIR)\stringformat_nibble.$(EXT_OBJ)
+!endif
+
+
# --------------------------------------------------
# Device Drivers
"process_exit.c",
"process_waitexit.c",
"process_getexitcode.c",
+ "process_getparam.c",
+ "process_setparam.c",
"process_setcurrentdir.c",
"process_getcurrentdir.c",
"process_getparentprocess.c",
"event_create.c",
"event_delete.c",
"event_set.c",
+ "event_clear.c",
"event_wait.c",
]
],
"drvobj_read.c",
"drvobj_seek.c",
"drvobj_write.c",
- "filefmt.c",
"fileobj_constructor.c",
"fileobj_create.c",
"fileobj_delete.c",
"file_readdir.c",
"file_seek.c",
"file_write.c",
- "stdfile.c",
+ "file_printformat.c",
+ "file_printformatv.c",
+ "stdio_printformat.c",
"syncdrv_constructor.c",
"syncdrv_destructor.c",
"syncdrv_endprocess.c",
"crc16_table.c",
],
],
+ [
+ "String Format",
+ "\$(COMMON_HEADERS)",
+ "\$(HOSAPLFW_DIR)/library/algorithm/stringformat",
+ "STRINGFORMAT",
+ "Yes",
+ [
+ "stringformat.h",
+ "stringformat_local.h",
+ ],
+ [
+ "stringformat_formatstring.c",
+ "stringformat_formatstringv.c",
+ "stringformat_format.c",
+ "stringformat_formatv.c",
+ "stringformat_string.c",
+ "stringformat_decimal.c",
+ "stringformat_hexadecimal.c",
+ "stringformat_nibble.c",
+ ],
+ ],
],
[
"Device Drivers",
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file stringformat.h
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * %jp{浮動小数点などの機能制限をつけた軽量版 printf 作成を目指す}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#ifndef __HOS__stringformat_h__
+#define __HOS__stringformat_h__
+
+
+#include <stdarg.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int StringFormat_FormatString(char *pszBuf, int iBufSize, const char *pszFormat, ...);
+int StringFormat_FormatStringV(char *pszBuf, int iBufSize, const char *pszFormat, va_list argptr);
+
+int StringFormat_Format(int (*pfncPut)(int c, void *Param), void *Param, const char *pszFormat, ...); /* 書式付き出力 */
+int StringFormat_FormatV(int (*pfncPut)(int c, void *Param), void *Param, const char *pszFormat, va_list argptr); /* 書式付き出力(リスト渡し) */
+
+int StringFormat_Nibble(int (*pfncPut)(int c, void *Param), void *Param, unsigned char n); /* 4bitの16進数を出力 */
+int StringFormat_Hexadecimal(int (*pfncPut)(int c, void *Param), void *Param, unsigned long ulNum, int iWidth, int iPadChar, int iFlag); /* 16進数を出力 */
+int StringFormat_Decimal(int (*pfncPut)(int c, void *Param), void *Param, long lNum, int iSigned, int iWidth, int iPadChar, int iFlag); /* 10進数出力 */
+int StringFormat_String(int (*pfncPut)(int c, void *Param), void *Param, const char *pszStr, int iWidth, int iFlag); /* 文字列出力 */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __HOS__stringformat_h__ */
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+/* 符号付付き10進数出力 */
+int StringFormat_Decimal(int (*pfncPut)(int c, void *Param), void *Param, long lNum, int iSigned, int iWidth, int iPadChar, int iFlag)
+{
+ unsigned long ulNum;
+ char szBuf[10];
+ int iLen = 0;
+ int iSignChar;
+ int iPadSize;
+ int iSign;
+ int iSize;
+
+ /* 符号チェック */
+ if ( lNum < 0 && iSigned )
+ {
+ ulNum = -lNum;
+ iSign = 1;
+ iSignChar = '-';
+ }
+ else
+ {
+ ulNum = lNum;
+ iSign = (iFlag == '+') ? 1 : 0;
+ iSignChar = '+';
+ }
+
+ /* 文字列変換 */
+ iSize = 0;
+ do
+ {
+ szBuf[iSize++] = ulNum % 10 + '0';
+ ulNum /= 10;
+ } while ( ulNum != 0 );
+
+ /* パティングサイズ決定 */
+ iPadSize = iWidth - iSize - iSign;
+
+ /* 左詰属性が無ければ先にパディング */
+ if ( iFlag != '-' )
+ {
+ while ( iWidth > iSize + iSign )
+ {
+ iWidth--;
+ if ( pfncPut(iPadChar, Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+ }
+ }
+
+ /* 符号出力 */
+ if ( iSign )
+ {
+ if ( pfncPut(iSignChar, Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+ }
+
+ /* 数値出力 */
+ do
+ {
+ if ( pfncPut(szBuf[--iSize], Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+ } while ( iSize > 0);
+
+ /* 左詰属性なら後ろをパディング */
+ if ( iFlag == '-' )
+ {
+ while ( iPadSize > 0 )
+ {
+ if ( pfncPut(' ', Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+
+ iPadSize--;
+ }
+ }
+
+ return iLen;
+}
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+/* 書式付き出力 */
+int StringFormat_Format(int (*pfncPut)(int c, void *Param), void *Param, const char *pszFormat, ...)
+{
+ va_list argptr;
+ int iRet;
+
+ va_start(argptr, pszFormat);
+ iRet = StringFormat_FormatV(pfncPut, Param, pszFormat, argptr);
+ va_end(argptr);
+
+ return iRet;
+}
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+/* sprintfもどき */
+int StringFormat_FormatString(char *pszBuf, int iBufSize, const char *pszFormat, ...)
+{
+ va_list argptr;
+ int iRet;
+
+ va_start(argptr, pszFormat);
+ iRet = StringFormat_FormatStringV(pszBuf, iBufSize, pszFormat, argptr);
+ va_end(argptr);
+
+ return iRet;
+}
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+typedef struct t_stringformat_formatstring_info
+{
+ char *pszBuf;
+ int iBufSize;
+} T_STRINGFORAMT_FORMATSTRING_INFO;
+
+
+static int StringFormat_OutputFormatStringV(int c, void *Param);
+
+
+/* vsprintfもどき */
+int StringFormat_FormatStringV(char *pszBuf, int iBufSize, const char *pszFormat, va_list argptr)
+{
+ T_STRINGFORAMT_FORMATSTRING_INFO Info;
+
+ /* バッファ情報生成 */
+ Info.pszBuf = pszBuf;
+ Info.iBufSize = iBufSize;
+
+ return StringFormat_FormatV(StringFormat_OutputFormatStringV, (void *)&Info, pszFormat, argptr);
+}
+
+
+int StringFormat_OutputFormatStringV(int c, void *Param)
+{
+ T_STRINGFORAMT_FORMATSTRING_INFO *pInfo;
+
+ pInfo = (T_STRINGFORAMT_FORMATSTRING_INFO *)Param;
+
+ if ( pInfo->iBufSize <= 0 )
+ {
+ return 0;
+ }
+
+ *pInfo->pszBuf++ = (char)c;
+ pInfo->iBufSize--;
+
+ return 1;
+}
+
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+#define STRINGFORMAT_FORMAT_NORMAL 0
+#define STRINGFORMAT_FORMAT_ESC 1
+
+
+
+/* 書式付き出力(リスト渡し) */
+int StringFormat_FormatV(int (*pfncPut)(int c, void *Param), void *Param, const char *pszFormat, va_list argptr)
+{
+ int iState = STRINGFORMAT_FORMAT_NORMAL;
+ int iLong;
+ int iPadChar;
+ int iWidth;
+ int iFlag;
+ int iTmpLen;
+ int iLen = 0;
+ int c;
+
+ while ( (c = *pszFormat++) != '\0' )
+ {
+ switch ( iState )
+ {
+ case STRINGFORMAT_FORMAT_NORMAL:
+ if ( c == '%' )
+ {
+ iLong = 0;
+ iWidth = 0;
+ iFlag = ' ';
+ iPadChar = ' ';
+ iState = STRINGFORMAT_FORMAT_ESC;
+ }
+ else
+ {
+ /* 1文字出力 */
+ if ( pfncPut(c, Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+ }
+ break;
+
+ case STRINGFORMAT_FORMAT_ESC:
+ if ( c == '%' )
+ {
+ /* 1文字出力 */
+ if ( pfncPut(c, Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+ iState = STRINGFORMAT_FORMAT_NORMAL;
+ }
+ else if ( c == '+' || c == '-' )
+ {
+ iFlag = c;
+ }
+ else if ( c >= '0' && c <= '9' )
+ {
+ /* 表示読込み */
+ c -= '0';
+ iWidth = (iWidth * 10) + c;
+ if ( iWidth == 0 )
+ {
+ iPadChar = '0';
+ }
+ }
+ else if ( c == 'l' )
+ {
+ iLong = 1;
+ }
+ else if ( c == 'd' || c == 'x' || c == 'X' )
+ {
+ long lNum;
+
+ /* 引数取り出し */
+ if ( iLong )
+ {
+ lNum = va_arg(argptr, long);
+ }
+ else
+ {
+ lNum = va_arg(argptr, int);
+ }
+
+ if ( c == 'd' )
+ {
+ /* 符号付き10進数出力 */
+ iTmpLen = StringFormat_Decimal(pfncPut, Param, lNum, 1, iWidth, iPadChar, iFlag);
+ if ( iTmpLen <= 0 )
+ {
+ return iLen;
+ }
+ iLen += iTmpLen;
+ }
+ else
+ {
+ /* 16進数出力 */
+ iTmpLen = StringFormat_Hexadecimal(pfncPut, Param, lNum, iWidth, iPadChar, iFlag);
+ if ( iTmpLen <= 0 )
+ {
+ return iLen;
+ }
+ iLen += iTmpLen;
+ }
+
+ iState = STRINGFORMAT_FORMAT_NORMAL;
+ }
+ else if ( c == 'u' )
+ {
+ unsigned long ulNum;
+
+
+ /* 引数取り出し */
+ if ( iLong )
+ {
+ ulNum = va_arg(argptr, unsigned long);
+ }
+ else
+ {
+ ulNum = va_arg(argptr, unsigned int);
+ }
+
+ /* 符号無し10進数出力 */
+ iTmpLen = StringFormat_Decimal(pfncPut, Param, (long)ulNum, 0, iWidth, iPadChar, iFlag);
+ if ( iTmpLen <= 0 )
+ {
+ return iLen;
+ }
+ iLen += iTmpLen;
+
+ iState = STRINGFORMAT_FORMAT_NORMAL;
+ }
+ else if ( c == 's' )
+ {
+ const char *pszStr;
+
+ /* 引数取り出し */
+ pszStr = va_arg(argptr, const char *);
+
+ /* 文字列出力 */
+ iTmpLen = StringFormat_String(pfncPut, Param, pszStr, iWidth, iFlag);
+ if ( iTmpLen <= 0 )
+ {
+ return iLen;
+ }
+ iLen += iTmpLen;
+
+
+ iState = STRINGFORMAT_FORMAT_NORMAL;
+ }
+ else
+ {
+ /* 1文字出力 */
+ if ( pfncPut(c, Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+ iState = STRINGFORMAT_FORMAT_NORMAL;
+ }
+ break;
+ }
+ }
+
+ return iLen;
+}
+
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+/* 16進数を出力 */
+int StringFormat_Hexadecimal(int (*pfncPut)(int c, void *Param), void *Param, unsigned long ulNum, int iWidth, int iPadChar, int iFlag)
+{
+ unsigned long ulTmp;
+ int iLen = 0;
+ int iSize = 0;
+ int iPadSize;
+
+
+ /* 最低限表示に必要なサイズを算出 */
+ ulTmp = ulNum;
+ do
+ {
+ iSize++;
+ ulTmp >>= 4;
+ } while ( ulTmp != 0 );
+
+ /* パティングサイズ決定 */
+ iPadSize = iWidth - iSize;
+
+ /* 左詰属性が無ければ先にパディング */
+ if ( iFlag != '-' )
+ {
+ while ( iPadSize > 0 )
+ {
+ if ( pfncPut(iPadChar, Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+
+ iPadSize--;
+ }
+ }
+
+ /* 上位桁から順に出力 */
+ iSize = (iSize - 1) * 4;
+ do
+ {
+ if ( StringFormat_Nibble(pfncPut, Param, (unsigned char)(ulNum >> iSize)) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+
+ iSize -= 4;
+ } while ( iSize >= 0 );
+
+
+ /* 左詰属性なら後ろをパディング */
+ if ( iFlag == '-' )
+ {
+ while ( iPadSize > 0 )
+ {
+ if ( pfncPut(' ', Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+
+ iPadSize--;
+ }
+ }
+
+ return iLen;
+}
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file stringformat.h
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * %jp{浮動小数点などの機能制限をつけた軽量版 printf 作成を目指す}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#ifndef __HOS__stringformat_local_h__
+#define __HOS__stringformat_local_h__
+
+
+#include "stringformat.h"
+
+
+#endif /* __HOS__stringformat_local_h__ */
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+/* 4bitの16進数を出力 */
+int StringFormat_Nibble(int (*pfncPut)(int c, void *Param), void *Param, unsigned char n)
+{
+ n &= 0xf;
+ if ( n < 10 )
+ {
+ n = n + '0';
+ }
+ else
+ {
+ n = n - 10 + 'a';
+ }
+ return pfncPut((int)n, Param);
+}
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include <string.h>
+#include "stringformat_local.h"
+
+
+
+/* 16進数を出力 */
+int StringFormat_String(int (*pfncPut)(int c, void *Param), void *Param, const char *pszStr, int iWidth, int iFlag)
+{
+ int iLen = 0;
+ int iSize = 0;
+ int iPadSize;
+
+ /* 最低限表示に必要なサイズを算出 */
+ iSize = strlen(pszStr);
+
+ /* パティングサイズ決定 */
+ iPadSize = iWidth - iSize;
+
+ /* 左詰属性が無ければ先にパディング */
+ if ( iFlag != '-' )
+ {
+ while ( iPadSize > 0 )
+ {
+ if ( pfncPut(' ', Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+
+ iPadSize--;
+ }
+ }
+
+ /* 文字列出力 */
+ while ( iSize > 0 )
+ {
+ if ( pfncPut(*pszStr++, Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+
+ iSize--;
+ }
+
+
+ /* 左詰属性なら後ろをパディング */
+ if ( iFlag == '-' )
+ {
+ while ( iPadSize > 0 )
+ {
+ if ( pfncPut(' ', Param) <= 0 )
+ {
+ return iLen;
+ }
+ iLen++;
+
+ iPadSize--;
+ }
+ }
+
+ return iLen;
+}
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file event.h
+ * @brief %jp{イベントオブジェクト}
+ *
+ * Copyright (C) 2006-2007 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "event_local.h"
+
+
+/* イベントクリア */
+EVENT_ERR Event_Clear(HANDLE hEvent)
+{
+ C_EVENT *self;
+
+ /* キャスト */
+ self = (C_EVENT *)hEvent;
+
+ /* イベント待ち */
+ SysEvt_Clear(self->hSysEvt);
+
+ return EVENT_ERR_OK;
+}
+
+
+/* end of file */
#define FILE_MAX_PATH 128 /* パス名の最大値 */
-#define FILE_MAX_NAME 12 /* 名前の最大値 */
+#define FILE_MAX_NAME 13 /* 名前の最大値 */
/* エラーコード定義 */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file file.c
+ * @brief %jp{ファイルシステム}
+ *
+ * Copyright (C) 2006 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include <stdio.h>
+#include <string.h>
+#include "file_local.h"
+#include "system/sysapi/sysapi.h"
+
+
+/* 書式付出力 */
+int File_PrintFormat(HANDLE hFile, const char *pszFormat, ...)
+{
+ va_list argptr;
+ int iRet;
+
+ va_start(argptr, pszFormat);
+ iRet = File_PrintFormatV(hFile, pszFormat, argptr);
+ va_end(argptr);
+
+ return iRet;
+}
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file file.c
+ * @brief %jp{ファイルシステム}
+ *
+ * Copyright (C) 2006 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include <stdio.h>
+#include <string.h>
+#include "file_local.h"
+#include "system/sysapi/sysapi.h"
+#include "library/algorithm/stringformat/stringformat.h"
+
+
+
+static int File_OutputPrintFormat(int c, void *Param); /* 書式ライブラリ用コールバック関数 */
+
+
+
+/* 書式付出力(リスト渡し) */
+int File_PrintFormatV(HANDLE hFile, const char *pszFormat, va_list argptr)
+{
+ return StringFormat_FormatV(File_OutputPrintFormat, (void *)hFile, pszFormat, argptr);
+}
+
+
+/* 書式ライブラリ用コールバック関数 */
+int File_OutputPrintFormat(int c, void *Param)
+{
+ HANDLE hFile;
+
+ hFile = (HANDLE)Param;
+
+ /* 結果をファイルシステムへリダイレクト */
+ if ( File_PutChar(hFile, c) == FILE_EOF )
+ {
+ return 0;
+ }
+
+ return 1;
+}
+
+
+/* end of file */
+++ /dev/null
-/**
- * Hyper Operating System Application Framework
- *
- * @file file.c
- * @brief %jp{ファイルシステム}
- *
- * Copyright (C) 2006 by Project HOS
- * http://sourceforge.jp/projects/hos/
- */
-
-
-#include <stdio.h>
-#include <string.h>
-#include "file_local.h"
-#include "system/sysapi/sysapi.h"
-#include "system/memory/memory.h"
-
-
-int File_PrintFormatV(HANDLE hFile, const char *pszFormat, va_list argptr)
-{
- char *pBuf;
- int iRet = 0;
-
- pBuf = (char *)Memory_Alloc(128);
- if ( pBuf != NULL )
- {
- /* iRet = vsprintf(pBuf, pszFormat, argptr); */ /* 肥大化するのでちと保留 */
- if ( iRet > 0 )
- {
- iRet = File_Write(hFile, pBuf, iRet);
- }
- Memory_Free(pBuf);
- }
-
- return iRet;
-}
-
-
-int File_PrintFormat(HANDLE hFile, const char *pszFormat, ...)
-{
- va_list argptr;
- int iRet;
-
- va_start(argptr, pszFormat);
- iRet = File_PrintFormatVL(hFile, pszFormat, argptr);
- va_end(argptr);
-
- return iRet;
-}
-
-
-/* 4bitの16進数を出力 */
-int File_PrintHexNibble(HANDLE hFile, unsigned char c)
-{
- c &= 0xf;
- if ( c < 10 )
- {
- c = c + '0';
- }
- else
- {
- c = c - 10 + 'a';
- }
- return File_PutChar(hFile, c);
-}
-
-/* n桁の16進数を出力 */
-int File_PrintHex(HANDLE hFile, unsigned long ulData, int n)
-{
- int iLen = 0;
- int i;
-
- for ( i = (n - 1) * 4 ; i >= 0; i-- )
- {
- if ( File_PrintHexNibble(hFile, (unsigned char)(ulData >> i)) == FILE_EOF )
- {
- break;
- }
- iLen++;
- }
-
- if ( iLen == 0 )
- {
- return FILE_EOF;
- }
- return iLen;
-}
-
-
-/* 書式付き10進数出力 */
-int File_PrintFormatDecimal(HANDLE hFile, long lNum, int iWidth, int iPadChar)
-{
- char szBuf[12];
- int iLen = 0;
- int iSign = 0;
- int i;
-
- /* 符号チェック */
- if ( lNum < 0 )
- {
- lNum = -lNum;
- iSign = 1;
- }
-
- /* 文字列変換 */
- i = sizeof(szBuf);
- szBuf[--i] = '\0';
- do
- {
- szBuf[--i] = lNum % 10 + '0';
- lNum = lNum / 10;
- } while ( lNum != 0 );
-
- /* 符号付加 */
- if ( iSign )
- {
- szBuf[--i] = '-';
- }
-
- iWidth -= (sizeof(szBuf) - i - 1);
- while ( iWidth > 0 )
- {
- File_PutChar(hFile, iPadChar);
- iWidth--;
- iLen++;
- }
-
- iLen += File_PutString(hFile, &szBuf[i]);
-
- return iLen;
-}
-
-
-int File_PrintFormatHex(HANDLE hFile, long lNum, int iWidth, int iPadChar)
-{
- char szBuf[9];
- int iLen = 0;
- int i;
-
- /* 文字列変換 */
- i = sizeof(szBuf);
- szBuf[--i] = '\0';
- do
- {
- szBuf[--i] = (lNum & 0xf) < 10 ? (lNum & 0xf) + '0' : (lNum & 0xf) - 10 + 'a';
- lNum = ((unsigned long)lNum >> 4);
- } while ( lNum != 0 );
-
- iWidth -= (sizeof(szBuf) - i - 1);
- while ( iWidth > 0 )
- {
- File_PutChar(hFile, iPadChar);
- iWidth--;
- iLen++;
- }
-
- iLen += File_PutString(hFile, &szBuf[i]);
-
- return iLen;
-}
-
-
-
-#define FILE_PRTFMT_NORMAL 0
-#define FILE_PRTFMT_ESC 1
-#define FILE_PRTFMT_WIDTH 2
-
-/* 書式付き出力軽量版 */
-int File_PrintFormatVL(HANDLE hFile, const char *pszFormat, va_list argptr)
-{
- int iState = FILE_PRTFMT_NORMAL;
- int iLong;
- int iPadChar;
- int iWidth;
- int iLen = 0;
- int c;
-
- while ( (c = *pszFormat++) != '\0' )
- {
- switch ( iState )
- {
- case FILE_PRTFMT_NORMAL:
- if ( c == '%' )
- {
- iLong = 0;
- iWidth = 0;
- iPadChar = ' ';
- iState = FILE_PRTFMT_ESC;
- }
- else
- {
- iLen += (File_PutChar(hFile, c) != FILE_EOF);
- }
- break;
-
- case FILE_PRTFMT_ESC:
- if ( c == '%' )
- {
- iLen += (File_PutChar(hFile, c) != FILE_EOF);
- iState = FILE_PRTFMT_NORMAL;
- }
- else if ( c >= '0' && c <= '9' )
- {
- c -= '0';
- iWidth = (iWidth * 10) + c;
- if ( iWidth == 0 )
- {
- iPadChar = '0';
- }
- }
- else if ( c == 'l' )
- {
- iLong = 1;
- }
- else if ( c == 'd' || c == 'x' || c == 'X' )
- {
- long lNum;
- if ( iLong )
- {
- lNum = va_arg(argptr, long);
- }
- else
- {
- lNum = va_arg(argptr, int);
- }
-
- if ( c == 'd' )
- {
- iLen += File_PrintFormatDecimal(hFile, lNum, iWidth, iPadChar);
- }
- else
- {
- iLen += File_PrintFormatHex(hFile, lNum, iWidth, iPadChar);
- }
- iState = FILE_PRTFMT_NORMAL;
- }
- else if ( c == 's' )
- {
- const char *pszStr;
- pszStr = va_arg(argptr, const char *);
- iLen += File_PutString(hFile, pszStr);
- iState = FILE_PRTFMT_NORMAL;
- }
- else
- {
- iLen += (File_PutChar(hFile, c) != FILE_EOF);
- iState = FILE_PRTFMT_NORMAL;
- }
- break;
- }
- }
-
- return iLen;
-}
-
-
-/* end of file */
+++ /dev/null
-#include "stdfile.h"
-
-int StdIo_PrintFormat(const char *pszFormat, ...)
-{
- va_list argptr;
- int iRet;
-
- va_start(argptr, pszFormat);
- iRet = File_PrintFormatVL(Process_GetStdOut(HANDLE_NULL), pszFormat, argptr);
- va_end(argptr);
-
- return iRet;
-}
-
-
* @file file.h
* @brief %jp{ファイルシステム}
*
- * Copyright (C) 2006 by Project HOS
+ * Copyright (C) 2006-2008 by Project HOS
* http://sourceforge.jp/projects/hos/
*/
#ifndef __HOS__stdfile_h__
#define __HOS__stdfile_h__
+
#include "system/file/file.h"
#include "system/process/process.h"
#endif
+
#endif /* __HOS__stdfile_h__ */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file file.h
+ * @brief %jp{ファイルシステム}
+ *
+ * Copyright (C) 2006 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stdfile.h"
+
+
+int StdIo_PrintFormat(const char *pszFormat, ...)
+{
+ va_list argptr;
+ int iRet;
+
+ va_start(argptr, pszFormat);
+ iRet = File_PrintFormatV(Process_GetStdOut(HANDLE_NULL), pszFormat, argptr);
+ va_end(argptr);
+
+ return iRet;
+}
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file process.c
+ * @brief %jp{プロセスオブジェクト}
+ *
+ * Copyright (C) 2006-2007 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+
+#include "process_local.h"
+
+
+
+/** プロセス固有情報の取得 */
+VPARAM Process_GetParam(HANDLE hProcess)
+{
+ C_PROCESS *self;
+
+ /* 指定が無ければ現在のプロセスとする */
+ if ( hProcess == HANDLE_NULL )
+ {
+ hProcess = Process_GetCurrentHandle();
+ }
+
+ /* ハンドルをキャスト */
+ self = (C_PROCESS *)hProcess;
+
+ /* パラメータを返す */
+ return self->Param;
+}
+
+
+
+/* end of file */
--- /dev/null
+/**
+ * Hyper Operating System Application Framework
+ *
+ * @file process.c
+ * @brief %jp{プロセスオブジェクト}
+ *
+ * Copyright (C) 2006-2007 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "process_local.h"
+
+
+
+/** プロセス固有情報の設定 */
+void Process_SetParam(HANDLE hProcess, VPARAM Param)
+{
+ C_PROCESS *self;
+
+ /* 指定が無ければ現在のプロセスとする */
+ if ( hProcess == HANDLE_NULL )
+ {
+ hProcess = Process_GetCurrentHandle();
+ }
+
+ /* ハンドルをキャスト */
+ self = (C_PROCESS *)hProcess;
+
+ /* パラメータを設定 */
+ self->Param = Param;
+}
+
+
+
+/* end of file */
#define _KERNEL_CFG_ACT_TSK_E_NOEXS TRUE
#define _KERNEL_CFG_ACT_TSK_E_NOSPT FALSE
-
/* iact_tsk */
+#define _KERNEL_CFG_IACT_TSK_E_ID TRUE
+#define _KERNEL_CFG_IACT_TSK_E_CTX TRUE
+#define _KERNEL_CFG_IACT_TSK_E_NOEXS TRUE
+#define _KERNEL_CFG_IACT_TSK_E_NOSPT FALSE
+
/* can_act */
#define _KERNEL_CFG_CAN_ACT_E_ID TRUE
#define _KERNEL_CFG_CAN_ACT_E_NOEXS TRUE
/* wup_tsk */
#define _KERNEL_CFG_WUP_TSK_E_ID TRUE
#define _KERNEL_CFG_WUP_TSK_E_NOEXS TRUE
+#define _KERNEL_CFG_WUP_TSK_E_QOVR TRUE
/* iwup_tsk */
/* can_wup */
#define _KERNEL_CFG_SIG_SEM_E_NOSPT FALSE
/* isig_sem */
+#define _KERNEL_CFG_ISIG_SEM_E_ID TRUE
+#define _KERNEL_CFG_ISIG_SEM_E_NOEXS TRUE
+#define _KERNEL_CFG_ISIG_SEM_E_QOVR TRUE
+#define _KERNEL_CFG_ISIG_SEM_E_NOSPT FALSE
/* wai_sem */
#define _KERNEL_CFG_WAI_SEM_E_ID TRUE
#define _KERNEL_CFG_SET_FLG_E_NOSPT FALSE
/* iset_flg */
+#define _KERNEL_CFG_ISET_FLG_E_ID TRUE
+#define _KERNEL_CFG_ISET_FLG_E_NOEXS TRUE
+#define _KERNEL_CFG_ISET_FLG_E_NOSPT FALSE
+
/* clr_flg */
#define _KERNEL_CFG_CLR_FLG_E_ID TRUE
#define _KERNEL_CFG_CLR_FLG_E_NOEXS TRUE
/* cre_dtq */
+#define _KERNEL_CFG_CRE_DTQ_E_ID TRUE
+#define _KERNEL_CFG_CRE_DTQ_E_RSATR TRUE
+#define _KERNEL_CFG_CRE_DTQ_E_OBJ TRUE
+#define _KERNEL_CFG_CRE_DTQ_E_NOMEM TRUE
+#define _KERNEL_CFG_CRE_DTQ_E_NOSPT FALSE
+
/* acre_dtq */
+#define _KERNEL_CFG_ACRE_DTQ_E_RSATR TRUE
+#define _KERNEL_CFG_ACRE_DTQ_E_NOID TRUE
+#define _KERNEL_CFG_ACRE_DTQ_E_NOMEM TRUE
+#define _KERNEL_CFG_ACRE_DTQ_E_NOSPT FALSE
+
/* del_dtq */
/* snd_dtq */
+#define _KERNEL_CFG_SND_DTQ_E_CTX TRUE
+#define _KERNEL_CFG_SND_DTQ_E_ID TRUE
+#define _KERNEL_CFG_SND_DTQ_E_NOEXS TRUE
+#define _KERNEL_CFG_SND_DTQ_E_NOSPT FALSE
+
/* ipsnd_dtq */
/* tsnd_dtq */
/* fsnd_dtq */
+#define _KERNEL_CFG_FSND_DTQ_E_ID TRUE
+#define _KERNEL_CFG_FSND_DTQ_E_NOEXS TRUE
+#define _KERNEL_CFG_FSND_DTQ_E_ILUSE TRUE
+#define _KERNEL_CFG_FSND_DTQ_E_NOSPT FALSE
+
/* ifsnd_dtq */
+
/* rcv_dtq */
+#define _KERNEL_CFG_RCV_DTQ_E_CTX TRUE
+#define _KERNEL_CFG_RCV_DTQ_E_ID TRUE
+#define _KERNEL_CFG_RCV_DTQ_E_NOEXS TRUE
+#define _KERNEL_CFG_RCV_DTQ_E_NOSPT FALSE
+
/* prcv_dtq */
+#define _KERNEL_CFG_PRCV_DTQ_E_CTX TRUE
+#define _KERNEL_CFG_PRCV_DTQ_E_ID TRUE
+#define _KERNEL_CFG_PRCV_DTQ_E_NOEXS TRUE
+#define _KERNEL_CFG_PRCV_DTQ_E_NOSPT FALSE
+
/* trcv_dtq */
/* ref_dtq */
/* snd_mbx */
/* rcv_mbx */
+#define _KERNEL_CFG_RCV_MBX_E_ID TRUE
+#define _KERNEL_CFG_RCV_MBX_E_NOEXS TRUE
+#define _KERNEL_CFG_RCV_MBX_E_NOSPT FALSE
+
/* prcv_mbx */
/* trcv_mbx */
/* ref_mbx */
/* iact_tsk */
+#define _KERNEL_SPT_IACT_TSK_E_ID _KERNEL_SPT_E_ID (_KERNEL_SPT_IACT_TSK_E_ID)
+#define _KERNEL_SPT_IACT_TSK_E_CTX _KERNEL_SPT_E_CTX (_KERNEL_SPT_IACT_TSK_E_CTX)
+#define _KERNEL_SPT_IACT_TSK_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_IACT_TSK_E_NOEXS)
+#define _KERNEL_SPT_IACT_TSK_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_IACT_TSK_E_NOSPT)
+
+
/* can_act */
#define _KERNEL_SPT_CAN_ACT_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_CAN_ACT_E_ID)
#define _KERNEL_SPT_CAN_ACT_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_CAN_ACT_E_NOEXS)
/* wup_tsk */
#define _KERNEL_SPT_WUP_TSK_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_WUP_TSK_E_ID)
#define _KERNEL_SPT_WUP_TSK_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_WUP_TSK_E_NOEXS)
+#define _KERNEL_SPT_WUP_TSK_E_QOVR _KERNEL_SPT_E_QOVR (_KERNEL_CFG_WUP_TSK_E_QOVR)
/* iwup_tsk */
/* can_wup */
#define _KERNEL_SPT_SIG_SEM_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_SIG_SEM_E_NOSPT)
/* isig_sem */
+#define _KERNEL_SPT_ISIG_SEM_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_ISIG_SEM_E_ID)
+#define _KERNEL_SPT_ISIG_SEM_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_ISIG_SEM_E_NOEXS)
+#define _KERNEL_SPT_ISIG_SEM_E_QOVR _KERNEL_SPT_E_QOVR (_KERNEL_CFG_ISIG_SEM_E_QOVR)
+#define _KERNEL_SPT_ISIG_SEM_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_ISIG_SEM_E_NOSPT)
/* wai_sem */
#define _KERNEL_SPT_WAI_SEM_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_WAI_SEM_E_ID)
#define _KERNEL_SPT_SET_FLG_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_SET_FLG_E_NOSPT)
/* iset_flg */
+#define _KERNEL_SPT_ISET_FLG_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_ISET_FLG_E_ID)
+#define _KERNEL_SPT_ISET_FLG_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_ISET_FLG_E_NOEXS)
+#define _KERNEL_SPT_ISET_FLG_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_ISET_FLG_E_NOSPT)
+
/* clr_flg */
#define _KERNEL_SPT_CLR_FLG_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_CLR_FLG_E_ID)
#define _KERNEL_SPT_CLR_FLG_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_CLR_FLG_E_NOEXS)
/* cre_dtq */
+#define _KERNEL_SPT_CRE_DTQ_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_CRE_DTQ_E_ID)
+#define _KERNEL_SPT_CRE_DTQ_E_RSATR _KERNEL_SPT_E_RSATR (_KERNEL_CFG_CRE_DTQ_E_RSATR)
+#define _KERNEL_SPT_CRE_DTQ_E_OBJ _KERNEL_SPT_E_OBJ (_KERNEL_CFG_CRE_DTQ_E_OBJ)
+#define _KERNEL_SPT_CRE_DTQ_E_NOMEM _KERNEL_SPT_E_NOMEM (_KERNEL_CFG_CRE_DTQ_E_NOMEM)
+#define _KERNEL_SPT_CRE_DTQ_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_CRE_DTQ_E_NOSPT)
+
/* acre_dtq */
+#define _KERNEL_SPT_ACRE_DTQ_E_RSATR _KERNEL_SPT_E_RSATR (_KERNEL_CFG_ACRE_DTQ_E_RSATR)
+#define _KERNEL_SPT_ACRE_DTQ_E_NOID _KERNEL_SPT_E_NOID (_KERNEL_CFG_ACRE_DTQ_E_NOID)
+#define _KERNEL_SPT_ACRE_DTQ_E_NOMEM _KERNEL_SPT_E_NOMEM (_KERNEL_CFG_ACRE_DTQ_E_NOMEM)
+#define _KERNEL_SPT_ACRE_DTQ_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_ACRE_DTQ_E_NOSPT)
+
/* del_dtq */
/* snd_dtq */
+#define _KERNEL_SPT_SND_DTQ_E_CTX _KERNEL_SPT_E_CTX (_KERNEL_CFG_SND_DTQ_E_CTX)
+#define _KERNEL_SPT_SND_DTQ_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_SND_DTQ_E_ID)
+#define _KERNEL_SPT_SND_DTQ_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_SND_DTQ_E_NOEXS)
+#define _KERNEL_SPT_SND_DTQ_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_SND_DTQ_E_NOSPT)
+
/* ipsnd_dtq */
/* tsnd_dtq */
/* fsnd_dtq */
+#define _KERNEL_SPT_FSND_DTQ_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_FSND_DTQ_E_ID)
+#define _KERNEL_SPT_FSND_DTQ_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_FSND_DTQ_E_NOEXS)
+#define _KERNEL_SPT_FSND_DTQ_E_ILUSE _KERNEL_SPT_E_ILUSE (_KERNEL_CFG_FSND_DTQ_E_ILUSE)
+#define _KERNEL_SPT_FSND_DTQ_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_FSND_DTQ_E_NOSPT)
+
/* ifsnd_dtq */
/* rcv_dtq */
+#define _KERNEL_SPT_RCV_DTQ_E_CTX _KERNEL_SPT_E_CTX (_KERNEL_CFG_RCV_DTQ_E_CTX)
+#define _KERNEL_SPT_RCV_DTQ_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_RCV_DTQ_E_ID)
+#define _KERNEL_SPT_RCV_DTQ_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_RCV_DTQ_E_NOEXS)
+#define _KERNEL_SPT_RCV_DTQ_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_RCV_DTQ_E_NOSPT)
+
/* prcv_dtq */
+#define _KERNEL_SPT_PRCV_DTQ_E_CTX _KERNEL_SPT_E_CTX (_KERNEL_CFG_PRCV_DTQ_E_CTX)
+#define _KERNEL_SPT_PRCV_DTQ_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_PRCV_DTQ_E_ID)
+#define _KERNEL_SPT_PRCV_DTQ_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_PRCV_DTQ_E_NOEXS)
+#define _KERNEL_SPT_PRCV_DTQ_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_PRCV_DTQ_E_NOSPT)
+
/* trcv_dtq */
+
/* ref_dtq */
+
/* cre_mbx */
#define _KERNEL_SPT_CRE_MBX_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_CRE_MBX_E_ID)
#define _KERNEL_SPT_CRE_MBX_E_RSATR _KERNEL_SPT_E_RSATR (_KERNEL_CFG_CRE_MBX_E_RSATR)
/* snd_mbx */
/* rcv_mbx */
+#define _KERNEL_SPT_RCV_MBX_E_ID _KERNEL_SPT_E_ID (_KERNEL_CFG_RCV_MBX_E_ID)
+#define _KERNEL_SPT_RCV_MBX_E_NOEXS _KERNEL_SPT_E_NOEXS (_KERNEL_CFG_RCV_MBX_E_NOEXS)
+#define _KERNEL_SPT_RCV_MBX_E_NOSPT _KERNEL_SPT_E_NOSPT (_KERNEL_CFG_RCV_MBX_E_NOSPT)
+
/* prcv_mbx */
/* trcv_mbx */
/* ref_mbx */
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_STA_CYC_E_ID
+#if _KERNEL_SPT_STA_CYC_E_ID
if ( !_KERNEL_CYC_CHECK_CYCID(cycid) )
{
return E_ID; /* %jp{ID不正} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコール開始} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_STA_CYC_E_NOEXS
+#if _KERNEL_SPT_STA_CYC_E_NOEXS
if ( !_KERNEL_CYC_CHECK_EXS(cycid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_STP_CYC_E_ID
+#if _KERNEL_SPT_STP_CYC_E_ID
if ( !_KERNEL_CYC_CHECK_CYCID(cycid) )
{
return E_ID; /* %jp{ID不正} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコール開始} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_STP_CYC_E_NOEXS
+#if _KERNEL_SPT_STP_CYC_E_NOEXS
if ( !_KERNEL_CYC_CHECK_EXS(cycid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
_KERNEL_DTQ_T_DTQCNT dtqcnt;
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SIG_DTQ_E_ID
+#if _KERNEL_SPT_FSND_DTQ_E_ID
if ( !_KERNEL_DTQ_CHECK_DTQID(dtqid) )
{
return E_ID; /* %jp{不正ID番号}%en{Invalid ID number} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコールに入る}%en{enter service-call} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_FSND_DTQ_E_NOEXS
+#if _KERNEL_SPT_FSND_DTQ_E_NOEXS
if ( !_KERNEL_DTQ_CHECK_EXS(dtqid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
/* %jp{データキュー領域の容量取得} */
dtqcnt = _KERNEL_DTQ_GET_DTQCNT(dtqcb_ro);
-#ifdef _KERNEL_SPT_FSND_DTQ_E_ILUSE
+#if _KERNEL_SPT_FSND_DTQ_E_ILUSE
if ( dtqcnt == 0 )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
/* %jp{メモリ不足エラーチェックサポートの判定} */
-#if (_KERNEL_SPT_CRE_DTQ && _KERNEL_SPT_CRE_DTQ_E_NOMEM) || (_KERNEL_SPT_ADTQ_DTQ && _KERNEL_SPT_ACRE_DTQ_E_NOMEM)
+#if (_KERNEL_SPT_CRE_DTQ && _KERNEL_SPT_CRE_DTQ_E_NOMEM) || (_KERNEL_SPT_ACRE_DTQ && _KERNEL_SPT_ACRE_DTQ_E_NOMEM)
#define _KERNEL_SPT_KCRE_DTQ_E_NOMEM TRUE
#else
#define _KERNEL_SPT_KCRE_DTQ_E_NOMEM FALSE
ER ercd;
/* %jp{コンテキストチェック} */
-#if _KERNEL_SPT_WAI_SEM_E_CTX
+#if _KERNEL_SPT_PRCV_DTQ_E_CTX
if ( _KERNEL_SYS_SNS_DPN() )
{
return E_CTX; /* %jp{コンテキストエラー}%en{Context error} */
#endif
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_RCV_DTQ_E_ID
+#if _KERNEL_SPT_PRCV_DTQ_E_ID
if ( !_KERNEL_DTQ_CHECK_DTQID(dtqid) )
{
return E_ID; /* %jp{不正ID番号}%en{Invalid ID number} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコールに入る}%en{enter service-call} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_RCV_DTQ_E_NOEXS
+#if _KERNEL_SPT_PRCV_DTQ_E_NOEXS
if ( !_KERNEL_DTQ_CHECK_EXS(dtqid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
ER ercd;
/* %jp{コンテキストチェック} */
-#if _KERNEL_SPT_WAI_SEM_E_CTX
+#if _KERNEL_SPT_RCV_DTQ_E_CTX
if ( _KERNEL_SYS_SNS_DPN() )
{
return E_CTX; /* %jp{コンテキストエラー}%en{Context error} */
#endif
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_RCV_DTQ_E_ID
+#if _KERNEL_SPT_RCV_DTQ_E_ID
if ( !_KERNEL_DTQ_CHECK_DTQID(dtqid) )
{
return E_ID; /* %jp{不正ID番号}%en{Invalid ID number} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコールに入る}%en{enter service-call} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_RCV_DTQ_E_NOEXS
+#if _KERNEL_SPT_RCV_DTQ_E_NOEXS
if ( !_KERNEL_DTQ_CHECK_EXS(dtqid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
ER ercd;
/* %jp{コンテキストチェック} */
-#if _KERNEL_SPT_WAI_SEM_E_CTX
+#if _KERNEL_SPT_SND_DTQ_E_CTX
if ( _KERNEL_SYS_SNS_DPN() )
{
return E_CTX; /* %jp{コンテキストエラー}%en{Context error} */
#endif
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SND_DTQ_E_ID
+#if _KERNEL_SPT_SND_DTQ_E_ID
if ( !_KERNEL_DTQ_CHECK_DTQID(dtqid) )
{
return E_ID; /* %jp{不正ID番号}%en{Invalid ID number} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコールに入る}%en{enter service-call} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SND_DTQ_E_NOEXS
+#if _KERNEL_SPT_SND_DTQ_E_NOEXS
if ( !_KERNEL_DTQ_CHECK_EXS(dtqid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
ER ercd;
/* %jp{コンテキストチェック} */
-#if _KERNEL_SPT_KWAI_DTQ_E_CTX
+#if _KERNEL_SPT_KRCV_DTQ_E_CTX
if ( tmout != TMO_POL && _KERNEL_SYS_SNS_DPN() )
{
return E_CTX; /* %jp{コンテキストエラー}%en{Context error} */
#endif
/* %jp{ID のチェック} */
-#if _KERNEL_SPT_KWAI_DTQ_E_ID
+#if _KERNEL_SPT_KRCV_DTQ_E_ID
if ( !_KERNEL_DTQ_CHECK_DTQID(dtqid) )
{
return E_ID; /* %jp{不正ID番号}%en{Invalid ID number} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコールに入る}%en{enter service-call} */
/* %jp{オブジェクト存在チェック} */
-#if _KERNEL_SPT_KWAI_DTQ_E_NOEXS
+#if _KERNEL_SPT_KRCV_DTQ_E_NOEXS
if ( !_KERNEL_DTQ_CHECK_EXS(dtqid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコールから出る}%en{leave service-call} */
_KERNEL_DSP_WAI_TSK(tskhdl); /* %jp{待ち状態に設定} */
_KERNEL_DTQ_ADD_RQUE(dtqcb, dtqcb_ro, tskhdl); /* %jp{待ち行列に追加} */
-#if _KERNEL_SPT_TWAI_DTQ
+#if _KERNEL_SPT_TRCV_DTQ
if ( tmout != TMO_FEVR )
{
_KERNEL_DTQ_ADD_TOQ(tskhdl, tmout); /* %jp{タイムアウトキューに追加} */
_KERNEL_T_FLGCB *flgcb;
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_CLR_FLG_E_ID
+#if _KERNEL_SPT_CLR_FLG_E_ID
if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
{
return E_ID; /* %jp{ID不正} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコール開始} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_CLR_FLG_E_NOEXS
+#if _KERNEL_SPT_CLR_FLG_E_NOEXS
if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
/* %jp{存在チェック}%en{check object} */
#if _KERNEL_SPT_DEL_FLG_E_NOEXS
- if ( _KERNEL_FLG_CHECK_EXS(flgid) )
+ if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコールから出る}%en{leave service-call} */
return E_NOEXS;
ER ercd;
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_ISET_FLG_E_ID
+#if _KERNEL_SPT_ISET_FLG_E_ID
if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
{
return E_ID; /* %jp{ID不正} */
setptn = (FLGPTN)_KERNEL_SYS_RCV_DPC();
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_ISET_FLG_E_NOEXS
+#if _KERNEL_SPT_ISET_FLG_E_NOEXS
if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
{
return; /* %jp{オブジェクト未生成} */
#else /* _KERNEL_SPT_SET_FLG */
-#if _KERNEL_SPT_SET_IFLG_E_NOSPT
+#if _KERNEL_SPT_ISET_FLG_E_NOSPT
/** %jp{イベントフラグ資源の返却}%en{Release Flgaphore Resource}
* @param flgid %jp{イベントフラグ資源返却対象のイベントフラグのID番号}%en{ID number of the Eventflag to which resource is released}
ER ercd;
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_POL_FLG_E_ID
+#if _KERNEL_SPT_POL_FLG_E_ID
if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
{
return E_ID; /* %jp{ID不正} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコール開始} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_POL_FLG_E_NOEXS
+#if _KERNEL_SPT_POL_FLG_E_NOEXS
if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
BOOL wupflg = FALSE;
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SET_FLG_E_ID
+#if _KERNEL_SPT_SET_FLG_E_ID
if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
{
return E_ID; /* %jp{ID不正} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコール開始} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SET_FLG_E_NOEXS
+#if _KERNEL_SPT_SET_FLG_E_NOEXS
if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
#endif
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_TWAI_FLG_E_ID
+#if _KERNEL_SPT_TWAI_FLG_E_ID
if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
{
return E_ID; /* %jp{ID不正} */
#endif
/* %jp{パラメータのチェック} */
-#ifdef _KERNEL_SPT_TWAI_FLG_E_PAR
+#if _KERNEL_SPT_TWAI_FLG_E_PAR
if ( waiptn == 0 )
{
return E_PAR; /* %jp{パラメータ不正} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコール開始} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_TWAI_FLG_E_NOEXS
+#if _KERNEL_SPT_TWAI_FLG_E_NOEXS
if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
#endif
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_WAI_FLG_E_ID
+#if _KERNEL_SPT_WAI_FLG_E_ID
if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
{
return E_ID; /* %jp{ID不正} */
#endif
/* %jp{パラメータのチェック} */
-#ifdef _KERNEL_SPT_WAI_FLG_E_PAR
+#if _KERNEL_SPT_WAI_FLG_E_PAR
if ( waiptn == 0 )
{
return E_PAR; /* %jp{パラメータ不正} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコール開始} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_WAI_FLG_E_NOEXS
+#if _KERNEL_SPT_WAI_FLG_E_NOEXS
if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
ER ercd;
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SIG_MBX_E_ID
+#if _KERNEL_SPT_RCV_MBX_E_ID
if ( !_KERNEL_MBX_CHECK_MBXID(mbxid) )
{
return E_ID; /* %jp{不正ID番号}%en{Invalid ID number} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコールに入る}%en{enter service-call} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SIG_MBX_E_NOEXS
+#if _KERNEL_SPT_RCV_MBX_E_NOEXS
if ( !_KERNEL_MBX_CHECK_EXS(mbxid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
_KERNEL_T_TCB *tcb;
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SND_MBX_E_ID
+#if _KERNEL_SPT_SND_MBX_E_ID
if ( !_KERNEL_MBX_CHECK_MBXID(mbxid) )
{
return E_ID; /* %jp{不正ID番号}%en{Invalid ID number} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコールに入る}%en{enter service-call} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SND_MBX_E_NOEXS
+#if _KERNEL_SPT_SND_MBX_E_NOEXS
if ( !_KERNEL_MBX_CHECK_EXS(mbxid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
/* %jp{存在チェック}%en{check object} */
#if _KERNEL_SPT_DEL_MTX_E_NOEXS
- if ( _KERNEL_MTX_CHECK_EXS(mtxid) )
+ if ( !_KERNEL_MTX_CHECK_EXS(mtxid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコールから出る}%en{leave service-call} */
- return E_OBJ; /* %jp{オブジェクト状態エラー}%en{Object state error} */
+ return E_NOEXS;
}
#endif
/* %jp{存在チェック}%en{check object} */
#if _KERNEL_SPT_DEL_SEM_E_NOEXS
- if ( _KERNEL_SEM_CHECK_EXS(semid) )
+ if ( !_KERNEL_SEM_CHECK_EXS(semid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコールから出る}%en{leave service-call} */
return E_NOEXS;
ER ercd;
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_ISIG_SEM_E_ID
+#if _KERNEL_SPT_ISIG_SEM_E_ID
if ( !_KERNEL_SEM_CHECK_SEMID(semid) )
{
return E_ID; /* %jp{不正ID番号}%en{Invalid ID number} */
semid = (ID)_KERNEL_SYS_RCV_DPC();
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_ISIG_SEM_E_NOEXS
+#if _KERNEL_SPT_ISIG_SEM_E_NOEXS
if ( !_KERNEL_SEM_CHECK_EXS(semid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
semcnt = _KERNEL_SEM_GET_SEMCNT(semcb);
/* %jp{キューイングオーバーフローチェック} */
-#ifdef _KERNEL_SPT_SIG_SEM_E_QOVR
+#if _KERNEL_SPT_ISIG_SEM_E_QOVR
{
_KERNEL_T_SEMCB_RO_PTR semcb_ro;
#else /* _KERNEL_SPT_SIG_SEM */
-#if _KERNEL_SPT_SIG_ISEM_E_NOSPT
+#if _KERNEL_SPT_ISIG_SEM_E_NOSPT
/** %jp{セマフォ資源の返却}%en{Release Semaphore Resource}
* @param semid %jp{セマフォ資源返却対象のセマフォのID番号}%en{ID number of the semaphore to which resource is released}
_KERNEL_SEM_T_SEMCNT semcnt;
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SIG_SEM_E_ID
+#if _KERNEL_SPT_SIG_SEM_E_ID
if ( !_KERNEL_SEM_CHECK_SEMID(semid) )
{
return E_ID; /* %jp{不正ID番号}%en{Invalid ID number} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコールに入る}%en{enter service-call} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SIG_SEM_E_NOEXS
+#if _KERNEL_SPT_SIG_SEM_E_NOEXS
if ( !_KERNEL_SEM_CHECK_EXS(semid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
semcnt = _KERNEL_SEM_GET_SEMCNT(semcb);
/* %jp{キューイングオーバーフローチェック} */
-#ifdef _KERNEL_SPT_SIG_SEM_E_QOVR
+#if _KERNEL_SPT_SIG_SEM_E_QOVR
{
_KERNEL_T_SEMCB_RO_PTR semcb_ro;
_KERNEL_ENTER_SVC(); /* %jp{enter service-call}%jp{サービスコールに入る} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_CAN_WUP_E_NOEXS
+#if _KERNEL_SPT_CAN_WUP_E_NOEXS
if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{leave service-call}%jp{サービスコールを出る} */
_KERNEL_ENTER_SVC(); /* %jp{enter service-call}%jp{サービスコールに入る} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_REF_TSK_E_NOEXS
- if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+#if _KERNEL_SPT_REF_TSK_E_NOEXS
+ if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{leave service-call}%jp{サービスコールを出る} */
return E_NOEXS; /* %jp{オブジェクト未生成} */
/* %jp{存在チェック}%en{check object} */
#if _KERNEL_SPT_DEL_TSK_E_NOEXS
- if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+ if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコールから出る}%en{leave service-call} */
return E_NOEXS;
_KERNEL_ENTER_SVC(); /* %jp{enter service-call}%jp{サービスコールに入る} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_REF_TSK_E_NOEXS
- if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+#if _KERNEL_SPT_REF_TSK_E_NOEXS
+ if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{leave service-call}%jp{サービスコールを出る} */
return E_NOEXS; /* %jp{オブジェクト未生成} */
ER ercd;
/* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_IACT_TSK_E_ID
+#if _KERNEL_SPT_IACT_TSK_E_ID
if ( !_KERNEL_TSK_CHECK_TSKID(flgid) )
{
return E_ID; /* %jp{ID不正} */
}
#endif
-#ifdef _KERNEL_SPT_IACT_TSK_E_CTX
+#if _KERNEL_SPT_IACT_TSK_E_CTX
if ( !_KERNEL_SYS_SNS_CTX() )
{
return E_CTX; /* %jp{コンテキスト不正} */
tskid = (ID)_KERNEL_SYS_RCV_DPC();
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_CFG_IACT_TSK_E_NOEXS
- if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+#if _KERNEL_SPT_IACT_TSK_E_NOEXS
+ if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{leave service-call}%jp{サービスコールを出る} */
- return E_NOEXS; /* %jp{オブジェクト未生成} */
+ return ; /* %jp{オブジェクト未生成} */
}
#endif
_KERNEL_ENTER_SVC(); /* %jp{enter service-call}%jp{サービスコールに入る} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_REF_TST_E_NOEXS
+#if _KERNEL_SPT_REF_TST_E_NOEXS
if ( _KERNEL_TSK_CHECK_EXS(tskid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{leave service-call}%jp{サービスコールを出る} */
_KERNEL_ENTER_SVC(); /* %jp{enter service-call}%jp{サービスコールに入る} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_REL_WAI_E_NOEXS
- if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+#if _KERNEL_SPT_REL_WAI_E_NOEXS
+ if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{leave service-call}%jp{サービスコールを出る} */
return E_NOEXS; /* %jp{オブジェクト未生成} */
_KERNEL_ENTER_SVC(); /* %jp{enter service-call}%jp{サービスコールに入る} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SUS_TSK_E_NOEXS
- if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+#if _KERNEL_SPT_SUS_TSK_E_NOEXS
+ if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{leave service-call}%jp{サービスコールを出る} */
return E_NOEXS; /* %jp{オブジェクト未生成} */
_KERNEL_ENTER_SVC(); /* %jp{サービスコールに入る}%en{enter service-call} */
/* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SUS_TSK_E_NOEXS
+#if _KERNEL_SPT_SUS_TSK_E_NOEXS
if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコールを出る}%en{leave service-call} */
wupcnt = _KERNEL_TSK_GET_WUPCNT(tcb);
- #ifdef _KERNEL_SPT_WUP_TSK_E_QOVR
+#if _KERNEL_SPT_WUP_TSK_E_QOVR
if ( wupcnt >= _KERNEL_TMAX_WUPCNT )
{
_KERNEL_LEAVE_SVC(); /* %jp{サービスコール終了} */
return E_QOVR;
}
- #endif
+#endif
_KERNEL_TSK_SET_WUPCNT(tcb, wupcnt + 1);
}