wangbowen6
d77b53957c
sched/env: add tg_envc in task_group_s to avoid some loops in code
...
this commit optimize the env api speed
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-25 23:10:37 +02:00
Ville Juven
dc2b2dcb3f
sched/env: Check for incoming parameter validity in unsetenv()
...
Something the function did not do, check the incoming parameter is vlaid
2022-06-14 10:39:52 +03:00
Ville Juven
1b32fc1642
sched/env: Fix the return value of unsetenv()
...
If the environment variable does not exist, the function succeeds, as
defined by POSIX.
2022-06-14 10:39:52 +03:00
Xiang Xiao
2c82bef702
sched/environ: Refine the environment variables storage layout
...
to confirm the standard and then implement get_environ_ptr correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-18 10:33:37 +03:00
Xiang Xiao
701bbaac74
sched/environ: Ensure tg_envp terminated by double '\0'
...
so we can compute the whole environ string length from it
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-14 07:49:00 +03:00
Ville Juven
50578dc501
Fix the initial idle tasks environment
...
- User mode allocator was used for setting up the environment. This
works in flat mode and probably in protected mode as well, as there
is always a a single user allocator present
- This does not work in kernel mode, where each user task has its own
heap allocator. Also, when the idle tasks environment is being set,
no allocator is ready and the system crashes at once.
Fix this by using the group allocators instead:
- Idle task is a kernel task, so its group is privileged
- Add group_realloc
- Use the group_malloc/realloc functions instead of kumm_malloc
2022-03-16 20:21:19 +08:00
Xiang Xiao
2e54df0f35
Don't include assert.h from public header file
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Alin Jerpelea
8935ac4cc3
sched: Author Gregory Nutt: update licenses to Apache
...
Gregory Nutt has submitted the SGA and we can mograte the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-09 01:21:53 -08:00
Xiang Xiao
6a3c2aded6
Fix wait loop and void cast ( #24 )
...
* Simplify EINTR/ECANCEL error handling
1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx
* Unify the void cast usage
1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Gregory Nutt
f914ec6e2b
tools/nxstyle.c: Fix logic that detects if an operator is correctly delimited with spaces. sched/: Various changes because sched/ C files were used as Guinea Pigs to test nstyle.c.
2019-03-01 10:50:02 -06:00
Gregory Nutt
af50ab0088
sched/environ/env_unsetenv.c: Fix a memory leak introduced by the previous commit.
2018-09-30 11:45:59 -06:00
Gregory Nutt
d3c2373940
sched/environ/env_unsetenv.c: Fix and error in unsetenv() when unsetting the last of the environment variables.
2018-09-30 11:40:10 -06:00
Gregory Nutt
b54ffe858a
Standardization of some function headers.
2018-03-13 09:52:27 -06:00
Gregory Nutt
7cf88d7dbd
Make sure that labeling is used consistently in all function headers.
2018-02-01 10:00:02 -06:00
Gregory Nutt
6543c570d4
Remove some empty file section section header comments
2016-02-17 17:38:39 -06:00
Gregory Nutt
74db48202e
sched/: Replace explict references to g_readytorun with indirect references via the this_task() macro
2016-02-06 17:44:41 -06:00
Gregory Nutt
79d554939e
sched/: Fix some spacing issues
2015-10-07 19:59:14 -06:00
Gregory Nutt
9ad7dae4c1
Rename kufree to kumm_free for consistency with other naming
2014-08-31 16:15:11 -06:00
Gregory Nutt
9cd1ddada4
Rename kmemalign to kmm_memalign and krealloc to kmm_realooc for consistency with other naming
2014-08-31 15:27:37 -06:00
Gregory Nutt
d798dd37a7
Replace os_internal.h with sched/sched.h in files that actually reference something in sched.h
2014-08-08 17:53:55 -06:00
Gregory Nutt
e10a23ae50
Move environment files from sched/ to sched/environ
2014-08-08 13:53:29 -06:00