Implementation file of global init anf free functions.
MainContext impl | Implementation file of global init anf free functions. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file of MainContext. |
C-kern/ | Implementation file MainContext impl. |
maincontext_t | |
constants | |
maincontext_STATICSIZE | Defines size for s_maincontext_staticmem. |
maincontext_STATICTESTSIZE | Defines additonal size for s_maincontext_staticmem. |
global variables | |
g_maincontext | Reserve space for the global main context. |
static variables | |
s_maincontext_staticmem | Static memory block used in in global maincontext_t. |
s_maincontext_errtimer | Simulates an error in maincontext_t.init_maincontext. |
helper | |
initprogname_maincontext | Sets *progname to (strrchr(argv0, “/”)+1). |
lifetime | |
static-memory | |
test |
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 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 General Public License for more details.
© 2012 Jörg Seebohn
Header file of MainContext.
Implementation file MainContext impl.
constants | |
maincontext_STATICSIZE | Defines size for s_maincontext_staticmem. |
maincontext_STATICTESTSIZE | Defines additonal size for s_maincontext_staticmem. |
global variables | |
g_maincontext | Reserve space for the global main context. |
static variables | |
s_maincontext_staticmem | Static memory block used in in global maincontext_t. |
s_maincontext_errtimer | Simulates an error in maincontext_t.init_maincontext. |
helper | |
initprogname_maincontext | Sets *progname to (strrchr(argv0, “/”)+1). |
lifetime | |
static-memory | |
test |
#define maincontext_STATICSIZE processcontext_STATICSIZE
Defines size for s_maincontext_staticmem. This extrasize is needed during unit tests. This value is a copy of <processcontext_STATICSIZE>.
#define maincontext_STATICTESTSIZE ( maincontext_STATICSIZE )
Defines additonal size for s_maincontext_staticmem. This extrasize is needed during unit test time.
static uint8_t s_maincontext_staticmem[maincontext_STATICSIZE + maincontext_STATICTESTSIZE]
Static memory block used in in global maincontext_t.
static test_errortimer_t s_maincontext_errtimer
Simulates an error in maincontext_t.init_maincontext.
Defines size for s_maincontext_staticmem.
#define maincontext_STATICSIZE processcontext_STATICSIZE
Static memory block used in in global maincontext_t.
static uint8_t s_maincontext_staticmem[maincontext_STATICSIZE + maincontext_STATICTESTSIZE]
Defines additonal size for s_maincontext_staticmem.
#define maincontext_STATICTESTSIZE ( maincontext_STATICSIZE )
Reserve space for the global main context.
maincontext_t g_maincontext
Simulates an error in maincontext_t.init_maincontext.
static test_errortimer_t s_maincontext_errtimer
Initializes global program context.
int init_maincontext( const maincontext_e context_type, int argc, const char ** argv )
Sets *progname to (strrchr(argv0, “/”)+1).
static void initprogname_maincontext( const char ** progname, const char * argv0 )