| 95 | ****************************************************************************/ |
| 96 | |
| 97 | void exec_getsymtab(FAR const struct symtab_s **symtab, FAR int *nsymbols) |
| 98 | { |
| 99 | irqstate_t flags; |
| 100 | |
| 101 | DEBUGASSERT(symtab != NULL && nsymbols != NULL); |
| 102 | |
| 103 | /* Disable interrupts very briefly so that both the symbol table and its |
| 104 | * size are returned as a single atomic operation. |
| 105 | */ |
| 106 | |
| 107 | flags = spin_lock_irqsave(&g_exec_lock); |
| 108 | |
| 109 | #ifdef CONFIG_EXECFUNCS_HAVE_SYMTAB |
| 110 | /* If a bring-up symbol table has been provided and if the exec symbol |
| 111 | * table has not yet been initialized, then use the provided start-up |
| 112 | * symbol table. |
| 113 | */ |
| 114 | |
| 115 | if (g_exec_symtab == NULL) |
| 116 | { |
| 117 | g_exec_symtab = CONFIG_EXECFUNCS_SYMTAB_ARRAY; |
| 118 | g_exec_nsymbols = CONFIG_EXECFUNCS_NSYMBOLS_VAR; |
| 119 | } |
| 120 | #endif |
| 121 | |
| 122 | /* Return the symbol table and its size */ |
| 123 | |
| 124 | *symtab = g_exec_symtab; |
| 125 | *nsymbols = g_exec_nsymbols; |
| 126 | spin_unlock_irqrestore(&g_exec_lock, flags); |
| 127 | } |
| 128 | |
| 129 | /**************************************************************************** |
| 130 | * Name: exec_setsymtab |
no test coverage detected