diff --git a/configs/mikroe-stm32f4/kernel/stm32_userspace.c b/configs/mikroe-stm32f4/kernel/stm32_userspace.c index 18f19757fce..c7c89018ad7 100644 --- a/configs/mikroe-stm32f4/kernel/stm32_userspace.c +++ b/configs/mikroe-stm32f4/kernel/stm32_userspace.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/mikroe-stm32f4/kernel/stm32_userspace.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -101,6 +101,10 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = .us_bssstart = (uintptr_t)&_sbss, .us_bssend = (uintptr_t)&_ebss, + /* Memory manager heap structure */ + + .us_heap = &g_mmheap, + /* Task/thread startup routines */ .task_startup = task_startup, @@ -114,20 +118,6 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = .signal_handler = up_signal_handler, #endif - /* Memory manager entry points (declared in include/nuttx/mm/mm.h) */ - - .mm_initialize = umm_initialize, - .mm_addregion = umm_addregion, - .mm_trysemaphore = umm_trysemaphore, - .mm_givesemaphore = umm_givesemaphore, - - /* Memory manager entry points (declared in include/stdlib.h) */ - - .mm_malloc = malloc, - .mm_realloc = realloc, - .mm_zalloc = zalloc, - .mm_free = free, - /* User-space work queue support (declared in include/nuttx/wqueue.h) */ #ifdef CONFIG_LIB_USRWORK diff --git a/configs/mikroe-stm32f4/scripts/user-space.ld b/configs/mikroe-stm32f4/scripts/user-space.ld index 917046d2728..ffb106d8d0e 100644 --- a/configs/mikroe-stm32f4/scripts/user-space.ld +++ b/configs/mikroe-stm32f4/scripts/user-space.ld @@ -1,7 +1,7 @@ /**************************************************************************** * configs/mikroe-stm32f4/scripts/user-space.ld * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -37,21 +37,6 @@ * this script. */ -/* Make sure that the critical memory management functions are in user-space. - * the user heap memory manager will reside in user-space but be usable both - * by kernel- and user-space code - */ - -EXTERN(umm_initialize) -EXTERN(umm_addregion) -EXTERN(umm_trysemaphore) -EXTERN(umm_givesemaphore) - -EXTERN(malloc) -EXTERN(realloc) -EXTERN(zalloc) -EXTERN(free) - OUTPUT_ARCH(arm) SECTIONS { diff --git a/configs/open1788/kernel/lpc17_userspace.c b/configs/open1788/kernel/lpc17_userspace.c index 90007799014..37e0dfd3d6d 100644 --- a/configs/open1788/kernel/lpc17_userspace.c +++ b/configs/open1788/kernel/lpc17_userspace.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/open1788/kernel/lpc17_userspace.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -101,6 +101,10 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = .us_bssstart = (uintptr_t)&_sbss, .us_bssend = (uintptr_t)&_ebss, + /* Memory manager heap structure */ + + .us_heap = &g_mmheap, + /* Task/thread startup routines */ .task_startup = task_startup, @@ -114,20 +118,6 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = .signal_handler = up_signal_handler, #endif - /* Memory manager entry points (declared in include/nuttx/mm/mm.h) */ - - .mm_initialize = umm_initialize, - .mm_addregion = umm_addregion, - .mm_trysemaphore = umm_trysemaphore, - .mm_givesemaphore = umm_givesemaphore, - - /* Memory manager entry points (declared in include/stdlib.h) */ - - .mm_malloc = malloc, - .mm_realloc = realloc, - .mm_zalloc = zalloc, - .mm_free = free, - /* User-space work queue support (declared in include/nuttx/wqueue.h) */ #ifdef CONFIG_LIB_USRWORK diff --git a/configs/open1788/scripts/user-space.ld b/configs/open1788/scripts/user-space.ld index e2979e4a3b0..734e492d577 100644 --- a/configs/open1788/scripts/user-space.ld +++ b/configs/open1788/scripts/user-space.ld @@ -1,7 +1,7 @@ /**************************************************************************** * configs/open1788/scripts/user-space.ld * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -37,21 +37,6 @@ * this script. */ -/* Make sure that the critical memory management functions are in user-space. - * the user heap memory manager will reside in user-space but be usable both - * by kernel- and user-space code - */ - -EXTERN(umm_initialize) -EXTERN(umm_addregion) -EXTERN(umm_trysemaphore) -EXTERN(umm_givesemaphore) - -EXTERN(malloc) -EXTERN(realloc) -EXTERN(zalloc) -EXTERN(free) - OUTPUT_ARCH(arm) SECTIONS { diff --git a/configs/sam3u-ek/kernel/sam_userspace.c b/configs/sam3u-ek/kernel/sam_userspace.c index fed33dd3920..9ca96b12308 100644 --- a/configs/sam3u-ek/kernel/sam_userspace.c +++ b/configs/sam3u-ek/kernel/sam_userspace.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sam3u-ek/kernel/sam_userspace.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -101,6 +101,10 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = .us_bssstart = (uintptr_t)&_sbss, .us_bssend = (uintptr_t)&_ebss, + /* Memory manager heap structure */ + + .us_heap = &g_mmheap, + /* Task/thread startup routines */ .task_startup = task_startup, @@ -114,20 +118,6 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = .signal_handler = up_signal_handler, #endif - /* Memory manager entry points (declared in include/nuttx/mm/mm.h) */ - - .mm_initialize = umm_initialize, - .mm_addregion = umm_addregion, - .mm_trysemaphore = umm_trysemaphore, - .mm_givesemaphore = umm_givesemaphore, - - /* Memory manager entry points (declared in include/stdlib.h) */ - - .mm_malloc = malloc, - .mm_realloc = realloc, - .mm_zalloc = zalloc, - .mm_free = free, - /* User-space work queue support (declared in include/nuttx/wqueue.h) */ #ifdef CONFIG_LIB_USRWORK diff --git a/configs/sam3u-ek/scripts/user-space.ld b/configs/sam3u-ek/scripts/user-space.ld index 53b402257ad..fed1c24eadc 100644 --- a/configs/sam3u-ek/scripts/user-space.ld +++ b/configs/sam3u-ek/scripts/user-space.ld @@ -37,23 +37,7 @@ * this script. */ -/* Make sure that the critical memory management functions are in user-space. - * the user heap memory manager will reside in user-space but be usable both - * by kernel- and user-space code - */ - -EXTERN(umm_initialize) -EXTERN(umm_addregion) -EXTERN(umm_trysemaphore) -EXTERN(umm_givesemaphore) - -EXTERN(malloc) -EXTERN(realloc) -EXTERN(zalloc) -EXTERN(free) - OUTPUT_ARCH(arm) - SECTIONS { .userspace : { diff --git a/configs/stm3240g-eval/kernel/stm32_userspace.c b/configs/stm3240g-eval/kernel/stm32_userspace.c index f27209584a9..faca2fb74e0 100644 --- a/configs/stm3240g-eval/kernel/stm32_userspace.c +++ b/configs/stm3240g-eval/kernel/stm32_userspace.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm3240g-eval/kernel/stm32_userspace.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -101,6 +101,10 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = .us_bssstart = (uintptr_t)&_sbss, .us_bssend = (uintptr_t)&_ebss, + /* Memory manager heap structure */ + + .us_heap = &g_mmheap, + /* Task/thread startup routines */ .task_startup = task_startup, @@ -114,20 +118,6 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = .signal_handler = up_signal_handler, #endif - /* Memory manager entry points (declared in include/nuttx/mm/mm.h) */ - - .mm_initialize = umm_initialize, - .mm_addregion = umm_addregion, - .mm_trysemaphore = umm_trysemaphore, - .mm_givesemaphore = umm_givesemaphore, - - /* Memory manager entry points (declared in include/stdlib.h) */ - - .mm_malloc = malloc, - .mm_realloc = realloc, - .mm_zalloc = zalloc, - .mm_free = free, - /* User-space work queue support (declared in include/nuttx/wqueue.h) */ #ifdef CONFIG_LIB_USRWORK diff --git a/configs/stm3240g-eval/scripts/user-space.ld b/configs/stm3240g-eval/scripts/user-space.ld index 30dc3283555..b602a071c63 100644 --- a/configs/stm3240g-eval/scripts/user-space.ld +++ b/configs/stm3240g-eval/scripts/user-space.ld @@ -37,21 +37,6 @@ * this script. */ -/* Make sure that the critical memory management functions are in user-space. - * the user heap memory manager will reside in user-space but be usable both - * by kernel- and user-space code - */ - -EXTERN(umm_initialize) -EXTERN(umm_addregion) -EXTERN(umm_trysemaphore) -EXTERN(umm_givesemaphore) - -EXTERN(malloc) -EXTERN(realloc) -EXTERN(zalloc) -EXTERN(free) - OUTPUT_ARCH(arm) SECTIONS { diff --git a/configs/stm32f4discovery/kernel/stm32_userspace.c b/configs/stm32f4discovery/kernel/stm32_userspace.c index 3b6108eeded..1dac94c6fce 100644 --- a/configs/stm32f4discovery/kernel/stm32_userspace.c +++ b/configs/stm32f4discovery/kernel/stm32_userspace.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32f4discovery/kernel/stm32_userspace.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -73,7 +73,7 @@ * - The declaration extern uint32_t _sdata; makes C happy. C will believe * that the value _sdata is the address of a uint32_t variable _data (it is * not!). - * - We can recoved the linker value then by simply taking the address of + * - We can recover the linker value then by simply taking the address of * of _data. like: uint32_t *pdata = &_sdata; */ @@ -102,6 +102,10 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = .us_bssstart = (uintptr_t)&_sbss, .us_bssend = (uintptr_t)&_ebss, + /* Memory manager heap structure */ + + .us_heap = &g_mmheap, + /* Task/thread startup routines */ .task_startup = task_startup, @@ -115,20 +119,6 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) = .signal_handler = up_signal_handler, #endif - /* Memory manager entry points (declared in include/nuttx/mm/mm.h) */ - - .mm_initialize = umm_initialize, - .mm_addregion = umm_addregion, - .mm_trysemaphore = umm_trysemaphore, - .mm_givesemaphore = umm_givesemaphore, - - /* Memory manager entry points (declared in include/stdlib.h) */ - - .mm_malloc = malloc, - .mm_realloc = realloc, - .mm_zalloc = zalloc, - .mm_free = free, - /* User-space work queue support (declared in include/nuttx/wqueue.h) */ #ifdef CONFIG_LIB_USRWORK diff --git a/configs/stm32f4discovery/scripts/user-space.ld b/configs/stm32f4discovery/scripts/user-space.ld index 56d30a05f1d..4002d8bbccf 100644 --- a/configs/stm32f4discovery/scripts/user-space.ld +++ b/configs/stm32f4discovery/scripts/user-space.ld @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32f4discovery/scripts/user-space.ld * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -37,21 +37,6 @@ * this script. */ -/* Make sure that the critical memory management functions are in user-space. - * the user heap memory manager will reside in user-space but be usable both - * by kernel- and user-space code - */ - -EXTERN(umm_initialize) -EXTERN(umm_addregion) -EXTERN(umm_trysemaphore) -EXTERN(umm_givesemaphore) - -EXTERN(malloc) -EXTERN(realloc) -EXTERN(zalloc) -EXTERN(free) - OUTPUT_ARCH(arm) SECTIONS {