Changes the startup flow to the ff:
hardware -> core libraries init -> other libraries init -> os
init (optional) -> app_main
- hardware init resides in the port layer, and is the entry point
- core libraries init executes init functions of core components
- other libraries init executes init functions of other components (weak
references)
- after other lib is init, the app_main function is called, however,
an OS can wrap the real call to app_main to init its own stuff, and
*then* call the real app_main
This introduces the following changes :
* Implmentation added for pthread attribute related functions :
* pthread_attr_init
* pthread_attr_destroy
* pthread_attr_setdetachstate
* pthread_attr_getdetachstate
* pthread_attr_getstacksize
* pthread_attr_setstacksize
* pthread_create now supports passing attributes/configs through pthread_attr_t structure
* pthread_mutex_timedlock added
* pthread_exit added
* memory for joinable thread is freed before returning from pthread_join
The expected usage is:
esp_pthread_set_cfg(cfg);
pthread_create()
If the inherit flag is set, then all subsequent threads forked by this
thread will also inherit this configuration. This avoids having to
change/prefix this for each and every pthread_create() call.