all: Update reserved function names

Update reserved function names starting with one underscore, replacing
them as follows:
   '_k_' with 'z_'
   '_K_' with 'Z_'
   '_handler_' with 'z_handl_'
   '_Cstart' with 'z_cstart'
   '_Swap' with 'z_swap'

This renaming is done on both global and those static function names
in kernel/include and include/. Other static function names in kernel/
are renamed by removing the leading underscore. Other function names
not starting with any prefix listed above are renamed starting with
a 'z_' or 'Z_' prefix.

Function names starting with two or three leading underscores are not
automatcally renamed since these names will collide with the variants
with two or three leading underscores.

Various generator scripts have also been updated as well as perf,
linker and usb files. These are
   drivers/serial/uart_handlers.c
   include/linker/kobject-text.ld
   kernel/include/syscall_handler.h
   scripts/gen_kobject_list.py
   scripts/gen_syscall_header.py

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
Patrik Flykt 2019-03-08 14:19:05 -07:00 committed by Anas Nashif
commit 4344e27c26
324 changed files with 2264 additions and 2263 deletions

View file

@ -64,7 +64,7 @@ static int init_mem_slab_module(struct device *dev)
slab++) {
create_free_list(slab);
SYS_TRACING_OBJ_INIT(k_mem_slab, slab);
_k_object_init(slab);
z_object_init(slab);
}
return 0;
}
@ -84,10 +84,10 @@ void k_mem_slab_init(struct k_mem_slab *slab, void *buffer,
slab->buffer = buffer;
slab->num_used = 0;
create_free_list(slab);
_waitq_init(&slab->wait_q);
z_waitq_init(&slab->wait_q);
SYS_TRACING_OBJ_INIT(k_mem_slab, slab);
_k_object_init(slab);
z_object_init(slab);
}
int k_mem_slab_alloc(struct k_mem_slab *slab, void **mem, s32_t timeout)
@ -111,7 +111,7 @@ int k_mem_slab_alloc(struct k_mem_slab *slab, void **mem, s32_t timeout)
result = -ENOMEM;
} else {
/* wait for a free block or timeout */
result = _pend_curr(&lock, key, &slab->wait_q, timeout);
result = z_pend_curr(&lock, key, &slab->wait_q, timeout);
if (result == 0) {
*mem = _current->base.swap_data;
}
@ -126,12 +126,12 @@ int k_mem_slab_alloc(struct k_mem_slab *slab, void **mem, s32_t timeout)
void k_mem_slab_free(struct k_mem_slab *slab, void **mem)
{
k_spinlock_key_t key = k_spin_lock(&lock);
struct k_thread *pending_thread = _unpend_first_thread(&slab->wait_q);
struct k_thread *pending_thread = z_unpend_first_thread(&slab->wait_q);
if (pending_thread != NULL) {
_set_thread_return_value_with_data(pending_thread, 0, *mem);
_ready_thread(pending_thread);
_reschedule(&lock, key);
z_set_thread_return_value_with_data(pending_thread, 0, *mem);
z_ready_thread(pending_thread);
z_reschedule(&lock, key);
} else {
**(char ***)mem = slab->free_list;
slab->free_list = *(char **)mem;