mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
committed by
Alan Carvalho de Assis
parent
eca7059785
commit
f8a809eb5b
+6
-6
@@ -45,9 +45,11 @@
|
||||
#include <sys/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/streams.h>
|
||||
|
||||
/****************************************************************************
|
||||
@@ -82,9 +84,8 @@
|
||||
*/
|
||||
|
||||
#if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
|
||||
# include <nuttx/kmalloc.h>
|
||||
|
||||
/* Domain-specific allocations */
|
||||
/* Domain-specific allocations */
|
||||
|
||||
# define lib_malloc(s) kmm_malloc(s)
|
||||
# define lib_zalloc(s) kmm_zalloc(s)
|
||||
@@ -92,7 +93,7 @@
|
||||
# define lib_memalign(p,s) kmm_memalign(p,s)
|
||||
# define lib_free(p) kmm_free(p)
|
||||
|
||||
/* User-accessible allocations */
|
||||
/* User-accessible allocations */
|
||||
|
||||
# define lib_umalloc(s) kumm_malloc(s)
|
||||
# define lib_uzalloc(s) kumm_zalloc(s)
|
||||
@@ -100,16 +101,15 @@
|
||||
# define lib_ufree(p) kumm_free(p)
|
||||
|
||||
#else
|
||||
# include <stdlib.h>
|
||||
|
||||
/* Domain-specific allocations */
|
||||
/* Domain-specific allocations */
|
||||
|
||||
# define lib_malloc(s) malloc(s)
|
||||
# define lib_zalloc(s) zalloc(s)
|
||||
# define lib_realloc(p,s) realloc(p,s)
|
||||
# define lib_free(p) free(p)
|
||||
|
||||
/* User-accessible allocations */
|
||||
/* User-accessible allocations */
|
||||
|
||||
# define lib_umalloc(s) malloc(s)
|
||||
# define lib_uzalloc(s) zalloc(s)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libs/libc/unistd/lib_libdtoa.c
|
||||
* libs/libc/stdio/lib_libdtoa.c
|
||||
*
|
||||
* This file was ported to NuttX by Yolande Cates.
|
||||
*
|
||||
@@ -271,7 +271,9 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec,
|
||||
{
|
||||
obj->put(obj, '.');
|
||||
|
||||
/* Always print at least one digit to the right of the decimal point. */
|
||||
/* Always print at least one digit to the right of the decimal
|
||||
* point.
|
||||
*/
|
||||
|
||||
if (notrailing)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* libs/libc/unistd/lib_gethostname.c
|
||||
* libs/libc/unistd/lib_sethostname.c
|
||||
*
|
||||
* Copyright (C) 2015 Stavros Polymenis. All rights reserved.
|
||||
* Copyright (C) 2015, 2016 Gregory Nutt. All rights reserved.
|
||||
@@ -110,7 +110,7 @@ int sethostname(FAR const char *name, size_t size)
|
||||
irqstate_t flags;
|
||||
|
||||
/* Save the new host name, truncating to HOST_NAME_MAX if necessary. This
|
||||
* internal copy is always NUL terminated. The hostname is global resource.
|
||||
* internal copy is always NUL terminated. The hostname is global resource.
|
||||
* There is a microscopic possibility that it could be accessed while we
|
||||
* are setting it.
|
||||
*/
|
||||
|
||||
+11
-12
@@ -45,26 +45,26 @@
|
||||
#include <sys/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/streams.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* The NuttX NX library an be build in two modes: (1) as a standard, C-library
|
||||
* that can be used by normal, user-space applications, or (2) as a special,
|
||||
* kernel-mode NX-library only used within the OS. If NuttX is not being
|
||||
* built as separated kernel- and user-space modules, then only the first
|
||||
* mode is supported.
|
||||
/* The NuttX NX library can be build in two modes: (1) as a standard, C-
|
||||
* library that can be used by normal, user-space applications, or (2) as
|
||||
* a special, kernel-mode NX-library only used within the OS. If NuttX is
|
||||
* not being built as separated kernel- and user-space modules, then only
|
||||
* the first mode is supported.
|
||||
*/
|
||||
|
||||
#if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
|
||||
|
||||
# include <nuttx/kmalloc.h>
|
||||
|
||||
/* Domain-specific allocations */
|
||||
/* Domain-specific allocations */
|
||||
|
||||
# define lib_malloc(s) kmm_malloc(s)
|
||||
# define lib_zalloc(s) kmm_zalloc(s)
|
||||
@@ -72,7 +72,7 @@
|
||||
# define lib_memalign(p,s) kmm_memalign(p,s)
|
||||
# define lib_free(p) kmm_free(p)
|
||||
|
||||
/* User-accessible allocations */
|
||||
/* User-accessible allocations */
|
||||
|
||||
# define lib_umalloc(s) kumm_malloc(s)
|
||||
# define lib_uzalloc(s) kumm_zalloc(s)
|
||||
@@ -80,16 +80,15 @@
|
||||
# define lib_ufree(p) kumm_free(p)
|
||||
|
||||
#else
|
||||
# include <stdlib.h>
|
||||
|
||||
/* Domain-specific allocations */
|
||||
/* Domain-specific allocations */
|
||||
|
||||
# define lib_malloc(s) malloc(s)
|
||||
# define lib_zalloc(s) zalloc(s)
|
||||
# define lib_realloc(p,s) realloc(p,s)
|
||||
# define lib_free(p) free(p)
|
||||
|
||||
/* User-accessible allocations */
|
||||
/* User-accessible allocations */
|
||||
|
||||
# define lib_umalloc(s) malloc(s)
|
||||
# define lib_uzalloc(s) zalloc(s)
|
||||
|
||||
Reference in New Issue
Block a user