mtkernel_3/kernel/tkernel/tkinit.c | bare source | permlink (0.02 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * micro T-Kernel 3.00.00 4: * 5: * Copyright (C) 2006-2019 by Ken Sakamura. 6: * This software is distributed under the T-License 2.1. 7: *---------------------------------------------------------------------- 8: * 9: * Released by TRON Forum(http://www.tron.org) at 2019/12/11. 10: * 11: *---------------------------------------------------------------------- 12: */ 13: 14: /* 15: * tkinit.c 16: * Initialize micro T-Kernel objects. 17: */ 18: 19: #include "kernel.h" 20: #include "timer.h" 21: 22: /* 23: * Each kernel-object initialization 24: */ 25: EXPORT ER knl_init_object( void) 26: { 27: ER ercd; 28: 29: ercd = knl_task_initialize(); 30: if(ercd < E_OK) return ercd; 31: 32: #if USE_SEMAPHORE 33: ercd = knl_semaphore_initialize(); 34: if(ercd < E_OK) return ercd; 35: #endif 36: #if USE_EVENTFLAG 37: ercd = knl_eventflag_initialize(); 38: if(ercd < E_OK) return ercd; 39: #endif 40: #if USE_MAILBOX 41: ercd = knl_mailbox_initialize(); 42: if(ercd < E_OK) return ercd; 43: #endif 44: #if USE_MESSAGEBUFFER 45: ercd = knl_messagebuffer_initialize(); 46: if(ercd < E_OK) return ercd; 47: #endif 48: #if USE_LEGACY_API && USE_RENDEZVOUS 49: ercd = knl_rendezvous_initialize(); 50: if(ercd < E_OK) return ercd; 51: #endif 52: #if USE_MUTEX 53: ercd = knl_mutex_initialize(); 54: if(ercd < E_OK) return ercd; 55: #endif 56: #if USE_MEMORYPOOL 57: ercd = knl_memorypool_initialize(); 58: if(ercd < E_OK) return ercd; 59: #endif 60: #if USE_FIX_MEMORYPOOL 61: ercd = knl_fix_memorypool_initialize(); 62: if(ercd < E_OK) return ercd; 63: #endif 64: #if USE_CYCLICHANDLER 65: ercd = knl_cyclichandler_initialize(); 66: if(ercd < E_OK) return ercd; 67: #endif 68: #if USE_ALARMHANDLER 69: ercd = knl_alarmhandler_initialize(); 70: if(ercd < E_OK) return ercd; 71: #endif 72: 73: return E_OK; 74: }