Most of this is already done, but keep for reference until this list is gone through with a fine comb:
A potpourri of API inconsistencies that should be fixed:
- Complete elimination of K_type_OBJ_DEFINE() macros.
- These still exist for mutex and thread types.
- Complete elimination of kernel object typdefs that aren't wanted.
- These still exist for mutex and memory pool.
- May also want to get rid of for timer?
- May also want to get rid of for thread? (I think Ben has a good argument for keeping this one, but I'm not sure ...)
- Add missing delay argument support for K_THREAD_DEFINE().
- Currently can specify delay via k_thread_spawn() only ...
- Ensure kernel object init API arguments match what's specified in the Kernel Primer (v2).
- In some cases you may need to change the code – in other cases you may need to change the documentation.
- Should review all kernel object types, but at one point there were issues with thread, memory map, stack, message queue, and pipe.
- Issues to watch for:
- Missing arguments; extra arguments; arguments in the wrong order.
- Should try to have consistency when specifying "related" arguments. One thing in particular to try and ensure is that whenever an object is passed a pointer to a memory region and a size for that region, the pointer should be first and the size (or, in some cases, sizes) should be second. Right now we seem to have cases where the pointer comes last ...
- ... other anomalies? ...
|5122,2||unified: Eliminate k_mem_pool_t typedef||zephyr||Status: MERGED||+2||+1|
|5461,4||unified: Rework K_THREAD_DEFINE()||zephyr||Status: MERGED||+2||+1|
|5462,1||unified: Make mailbox API parameter names consistent||zephyr||Status: ABANDONED||+2||+1|
|5465,1||unified: Reorder k_mem_map_init() parameters||zephyr||Status: ABANDONED||0||+1|
|5468,1||unified: Reorder K_MEM_MAP_INITIALIZER() parameters||zephyr||Status: ABANDONED||0||+1|
|5469,1||unified: Make memory pool API parameter names consistent||zephyr||Status: ABANDONED||+1||+1|
|5470,1||unified, doc: Fix memory pool documentation||zephyr||Status: ABANDONED||-1||+1|
|5471,1||unified: Fix k_msgq_init() parameter ordering||zephyr||Status: ABANDONED||+1||+1|