Fix more places where the user-mode allocator is used to allocate kernel thread resources -- before the user-mode allocator even exists

This commit is contained in:
Gregory Nutt
2014-09-03 14:58:24 -06:00
parent 2300589c92
commit b2a94b6f2b
11 changed files with 82 additions and 51 deletions
+6 -2
View File
@@ -39,6 +39,8 @@
#include <sys/types.h>
#include <assert.h>
#include <nuttx/sched.h>
#include <nuttx/kmalloc.h>
@@ -76,8 +78,8 @@
*
* Description:
* Allocate memory appropriate for the group type. If the memory is
* part of a privileged, then it should be allocated so that it is
* only accessed by privileged code; Otherwise, it is a user mode
* part of a privileged group, then it should be allocated so that it
* is only accessible by privileged code; Otherwise, it is a user mode
* group and must be allocated so that it accessible by unprivileged
* code.
*
@@ -85,6 +87,8 @@
FAR void *group_malloc(FAR struct task_group_s *group, size_t nbytes)
{
DEBUGASSERT(group);
/* Check the group type */
if ((group->tg_flags & GROUP_FLAG_PRIVILEGED) != 0)