diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-09 21:12:20 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-09 21:12:20 +0000 |
commit | dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5 (patch) | |
tree | 0af32db840a032a50312791977b7d129def1d5b3 /nuttx/libc/spawn | |
parent | 2ac33dcffabd9422659c3b013ed8624c09ae90e4 (diff) | |
download | px4-nuttx-dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5.tar.gz px4-nuttx-dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5.tar.bz2 px4-nuttx-dda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5.zip |
More changes for a kernel-mode allocator (more to be done)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5724 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/libc/spawn')
-rw-r--r-- | nuttx/libc/spawn/lib_psfa_addclose.c | 4 | ||||
-rw-r--r-- | nuttx/libc/spawn/lib_psfa_adddup2.c | 4 | ||||
-rw-r--r-- | nuttx/libc/spawn/lib_psfa_addopen.c | 5 | ||||
-rw-r--r-- | nuttx/libc/spawn/lib_psfa_destroy.c | 4 |
4 files changed, 12 insertions, 5 deletions
diff --git a/nuttx/libc/spawn/lib_psfa_addclose.c b/nuttx/libc/spawn/lib_psfa_addclose.c index 1c72f0f82..4f813f65c 100644 --- a/nuttx/libc/spawn/lib_psfa_addclose.c +++ b/nuttx/libc/spawn/lib_psfa_addclose.c @@ -46,6 +46,8 @@ #include <nuttx/spawn.h> +#include "lib_internal.h" + /**************************************************************************** * Global Functions ****************************************************************************/ @@ -81,7 +83,7 @@ int posix_spawn_file_actions_addclose(FAR posix_spawn_file_actions_t *file_actio /* Allocate the action list entry */ entry = (FAR struct spawn_close_file_action_s *) - zalloc(sizeof(struct spawn_close_file_action_s)); + lib_zalloc(sizeof(struct spawn_close_file_action_s)); if (!entry) { diff --git a/nuttx/libc/spawn/lib_psfa_adddup2.c b/nuttx/libc/spawn/lib_psfa_adddup2.c index deb3cbdb3..a10f476f1 100644 --- a/nuttx/libc/spawn/lib_psfa_adddup2.c +++ b/nuttx/libc/spawn/lib_psfa_adddup2.c @@ -46,6 +46,8 @@ #include <nuttx/spawn.h> +#include "lib_internal.h" + /**************************************************************************** * Global Functions ****************************************************************************/ @@ -84,7 +86,7 @@ int posix_spawn_file_actions_adddup2(FAR posix_spawn_file_actions_t *file_action /* Allocate the action list entry */ entry = (FAR struct spawn_dup2_file_action_s *) - zalloc(sizeof(struct spawn_close_file_action_s)); + lib_zalloc(sizeof(struct spawn_close_file_action_s)); if (!entry) { diff --git a/nuttx/libc/spawn/lib_psfa_addopen.c b/nuttx/libc/spawn/lib_psfa_addopen.c index 66bbd813a..d9f5b849f 100644 --- a/nuttx/libc/spawn/lib_psfa_addopen.c +++ b/nuttx/libc/spawn/lib_psfa_addopen.c @@ -47,6 +47,8 @@ #include <nuttx/spawn.h> +#include "lib_internal.h" + /**************************************************************************** * Global Functions ****************************************************************************/ @@ -97,8 +99,7 @@ int posix_spawn_file_actions_addopen(FAR posix_spawn_file_actions_t *file_action /* Allocate the action list entry of this size */ - entry = (FAR struct spawn_open_file_action_s *)zalloc(alloc); - + entry = (FAR struct spawn_open_file_action_s *)lib_zalloc(alloc); if (!entry) { return ENOMEM; diff --git a/nuttx/libc/spawn/lib_psfa_destroy.c b/nuttx/libc/spawn/lib_psfa_destroy.c index a21886645..d80dbd978 100644 --- a/nuttx/libc/spawn/lib_psfa_destroy.c +++ b/nuttx/libc/spawn/lib_psfa_destroy.c @@ -45,6 +45,8 @@ #include <nuttx/spawn.h> +#include "lib_internal.h" + /**************************************************************************** * Global Functions ****************************************************************************/ @@ -86,7 +88,7 @@ int posix_spawn_file_actions_destroy(FAR posix_spawn_file_actions_t *file_action /* Get the pointer to the next element before destroying the current one */ next = curr->flink; - free(curr); + lib_free(curr); } /* Mark the list empty */ |