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/configs/ea3131 | |
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/configs/ea3131')
-rwxr-xr-x | nuttx/configs/ea3131/locked/mklocked.sh | 9 | ||||
-rw-r--r-- | nuttx/configs/ea3131/src/up_usbmsc.c | 9 |
2 files changed, 7 insertions, 11 deletions
diff --git a/nuttx/configs/ea3131/locked/mklocked.sh b/nuttx/configs/ea3131/locked/mklocked.sh index 731accde3..776247997 100755 --- a/nuttx/configs/ea3131/locked/mklocked.sh +++ b/nuttx/configs/ea3131/locked/mklocked.sh @@ -2,7 +2,7 @@ ########################################################################### # configs/ea3131/locked/mklocked.sh # -# Copyright (C) 2010-2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2010-2013 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -155,12 +155,7 @@ fi echo "EXTERN(dq_addfirst)" >>ld-locked.inc echo "EXTERN(up_initial_state)" >>ld-locked.inc - -answer=$(checkconfig CONFIG_HEAP_BASE) -if [ $answer = n ]; then - echo "EXTERN(up_allocate_heap)" >>ld-locked.inc -fi - +echo "EXTERN(up_allocate_heap)" >>ld-locked.inc echo "EXTERN(mm_initialize)" >>ld-locked.inc echo "EXTERN(irq_initialize)" >>ld-locked.inc echo "EXTERN(wd_initialize)" >>ld-locked.inc diff --git a/nuttx/configs/ea3131/src/up_usbmsc.c b/nuttx/configs/ea3131/src/up_usbmsc.c index e1869af4d..b91bc3598 100644 --- a/nuttx/configs/ea3131/src/up_usbmsc.c +++ b/nuttx/configs/ea3131/src/up_usbmsc.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/ea3131/src/up_usbmsc.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Configure and register the SAM3U MMC/SD SDIO block driver. @@ -46,6 +46,7 @@ #include <errno.h> #include <stdlib.h> +#include <nuttx/kmalloc.h> #include <nuttx/fs/fs.h> #include <nuttx/fs/mkfatfs.h> #include <nuttx/ramdisk.h> @@ -88,7 +89,7 @@ int usbmsc_archinitialize(void) uint8_t *pbuffer; int ret; - pbuffer = (uint8_t *) malloc (BUFFER_SIZE); + pbuffer = (uint8_t *)kmalloc(BUFFER_SIZE); if (!pbuffer) { lowsyslog("usbmsc_archinitialize: Failed to allocate ramdisk of size %d\n", @@ -107,7 +108,7 @@ int usbmsc_archinitialize(void) { printf("create_ramdisk: Failed to register ramdisk at %s: %d\n", g_source, -ret); - free(pbuffer); + kfree(pbuffer); return ret; } @@ -118,7 +119,7 @@ int usbmsc_archinitialize(void) { printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", g_source); - /* free(pbuffer); -- RAM disk is registered */ + /* kfree(pbuffer); -- RAM disk is registered */ return ret; } |