From 64feef0dde9d8353ffe4a3f257ab17848ccf6f53 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Tue, 10 May 2016 09:22:01 +0800 Subject: [PATCH] [LIBC] mv pthreads/libdl to libc and rename dfs_lwip to dfs_net --- .../dfs/filesystems/{lwip => net}/SConscript | 2 +- .../dfs/filesystems/{lwip => net}/arpa/inet.h | 0 .../{lwip/dfs_lwip.c => net/dfs_net.c} | 43 ++++++++++--------- .../{lwip/dfs_lwip.h => net/dfs_net.h} | 15 ++++--- .../{lwip/lwip_netdb.c => net/net_netdb.c} | 0 .../{lwip/lwip_select.c => net/net_select.c} | 4 +- .../lwip_sockets.c => net/net_sockets.c} | 30 ++++++------- .../dfs/filesystems/{lwip => net}/netdb.h | 0 .../filesystems/{lwip => net}/netinet/in.h | 0 .../filesystems/{lwip => net}/netinet/tcp.h | 0 .../filesystems/{lwip => net}/netinet/udp.h | 0 .../filesystems/{lwip => net}/sys/select.h | 0 .../filesystems/{lwip => net}/sys/socket.h | 0 components/libc/SConscript | 3 ++ components/{ => libc}/libdl/SConscript | 6 +-- components/{ => libc}/libdl/dlclose.c | 0 components/{ => libc}/libdl/dlerror.c | 0 components/{ => libc}/libdl/dlfcn.h | 0 components/{ => libc}/libdl/dlopen.c | 0 components/{ => libc}/libdl/dlsym.c | 0 components/libc/newlib/syscalls.c | 12 +++++- components/{ => libc}/pthreads/SConscript | 5 ++- components/{ => libc}/pthreads/clock_time.c | 0 components/{ => libc}/pthreads/mqueue.c | 0 components/{ => libc}/pthreads/mqueue.h | 0 components/{ => libc}/pthreads/posix_types.h | 0 components/{ => libc}/pthreads/pthread.c | 0 components/{ => libc}/pthreads/pthread.h | 0 components/{ => libc}/pthreads/pthread_attr.c | 0 .../{ => libc}/pthreads/pthread_barrier.c | 0 components/{ => libc}/pthreads/pthread_cond.c | 0 .../{ => libc}/pthreads/pthread_internal.h | 0 .../{ => libc}/pthreads/pthread_mutex.c | 0 .../{ => libc}/pthreads/pthread_rwlock.c | 0 components/{ => libc}/pthreads/pthread_spin.c | 0 components/{ => libc}/pthreads/pthread_tls.c | 0 components/{ => libc}/pthreads/sched.c | 0 components/{ => libc}/pthreads/sched.h | 0 components/{ => libc}/pthreads/semaphore.c | 0 components/{ => libc}/pthreads/semaphore.h | 0 .../net/lwip-1.4.1/src/arch/include/arch/cc.h | 2 +- 41 files changed, 69 insertions(+), 53 deletions(-) rename components/dfs/filesystems/{lwip => net}/SConscript (82%) rename components/dfs/filesystems/{lwip => net}/arpa/inet.h (100%) rename components/dfs/filesystems/{lwip/dfs_lwip.c => net/dfs_net.c} (73%) rename components/dfs/filesystems/{lwip/dfs_lwip.h => net/dfs_net.h} (77%) rename components/dfs/filesystems/{lwip/lwip_netdb.c => net/net_netdb.c} (100%) rename components/dfs/filesystems/{lwip/lwip_select.c => net/net_select.c} (98%) rename components/dfs/filesystems/{lwip/lwip_sockets.c => net/net_sockets.c} (89%) rename components/dfs/filesystems/{lwip => net}/netdb.h (100%) rename components/dfs/filesystems/{lwip => net}/netinet/in.h (100%) rename components/dfs/filesystems/{lwip => net}/netinet/tcp.h (100%) rename components/dfs/filesystems/{lwip => net}/netinet/udp.h (100%) rename components/dfs/filesystems/{lwip => net}/sys/select.h (100%) rename components/dfs/filesystems/{lwip => net}/sys/socket.h (100%) rename components/{ => libc}/libdl/SConscript (66%) rename components/{ => libc}/libdl/dlclose.c (100%) rename components/{ => libc}/libdl/dlerror.c (100%) rename components/{ => libc}/libdl/dlfcn.h (100%) rename components/{ => libc}/libdl/dlopen.c (100%) rename components/{ => libc}/libdl/dlsym.c (100%) rename components/{ => libc}/pthreads/SConscript (71%) rename components/{ => libc}/pthreads/clock_time.c (100%) rename components/{ => libc}/pthreads/mqueue.c (100%) rename components/{ => libc}/pthreads/mqueue.h (100%) rename components/{ => libc}/pthreads/posix_types.h (100%) rename components/{ => libc}/pthreads/pthread.c (100%) rename components/{ => libc}/pthreads/pthread.h (100%) rename components/{ => libc}/pthreads/pthread_attr.c (100%) rename components/{ => libc}/pthreads/pthread_barrier.c (100%) rename components/{ => libc}/pthreads/pthread_cond.c (100%) rename components/{ => libc}/pthreads/pthread_internal.h (100%) rename components/{ => libc}/pthreads/pthread_mutex.c (100%) rename components/{ => libc}/pthreads/pthread_rwlock.c (100%) rename components/{ => libc}/pthreads/pthread_spin.c (100%) rename components/{ => libc}/pthreads/pthread_tls.c (100%) rename components/{ => libc}/pthreads/sched.c (100%) rename components/{ => libc}/pthreads/sched.h (100%) rename components/{ => libc}/pthreads/semaphore.c (100%) rename components/{ => libc}/pthreads/semaphore.h (100%) diff --git a/components/dfs/filesystems/lwip/SConscript b/components/dfs/filesystems/net/SConscript similarity index 82% rename from components/dfs/filesystems/lwip/SConscript rename to components/dfs/filesystems/net/SConscript index 7bc160af84..810ca16fef 100644 --- a/components/dfs/filesystems/lwip/SConscript +++ b/components/dfs/filesystems/net/SConscript @@ -6,6 +6,6 @@ cwd = GetCurrentDir() src = Glob('*.c') CPPPATH = [cwd] -group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS', 'RT_USING_DFS_LWIP'], CPPPATH = CPPPATH) +group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS', 'RT_USING_DFS_NET'], CPPPATH = CPPPATH) Return('group') diff --git a/components/dfs/filesystems/lwip/arpa/inet.h b/components/dfs/filesystems/net/arpa/inet.h similarity index 100% rename from components/dfs/filesystems/lwip/arpa/inet.h rename to components/dfs/filesystems/net/arpa/inet.h diff --git a/components/dfs/filesystems/lwip/dfs_lwip.c b/components/dfs/filesystems/net/dfs_net.c similarity index 73% rename from components/dfs/filesystems/lwip/dfs_lwip.c rename to components/dfs/filesystems/net/dfs_net.c index 86494c9d69..cda8407f17 100644 --- a/components/dfs/filesystems/lwip/dfs_lwip.c +++ b/components/dfs/filesystems/net/dfs_net.c @@ -1,7 +1,7 @@ /* - * File : dfs_lwip.c + * File : dfs_net.c * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2015, RT-Thread Development Team + * COPYRIGHT (C) 2015-2016, RT-Thread Development Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,15 +20,16 @@ * Change Logs: * Date Author Notes * 2015-02-17 Bernard First version + * 2016-05-07 Bernard Rename dfs_lwip to dfs_net */ #include #include #include -#include "dfs_lwip.h" +#include "dfs_net.h" -int dfs_lwip_getsocket(int fd) +int dfs_net_getsocket(int fd) { struct dfs_fd *_dfs_fd; @@ -40,12 +41,12 @@ int dfs_lwip_getsocket(int fd) return (int)_dfs_fd->data; } -int dfs_lwip_ioctl(struct dfs_fd* file, int cmd, void* args) +int dfs_net_ioctl(struct dfs_fd* file, int cmd, void* args) { return -DFS_STATUS_EIO; } -int dfs_lwip_read(struct dfs_fd* file, void *buf, rt_size_t count) +int dfs_net_read(struct dfs_fd* file, void *buf, rt_size_t count) { int sock; @@ -55,7 +56,7 @@ int dfs_lwip_read(struct dfs_fd* file, void *buf, rt_size_t count) return count; } -int dfs_lwip_write(struct dfs_fd *file, const void *buf, rt_size_t count) +int dfs_net_write(struct dfs_fd *file, const void *buf, rt_size_t count) { int sock; @@ -65,7 +66,7 @@ int dfs_lwip_write(struct dfs_fd *file, const void *buf, rt_size_t count) return count; } -int dfs_lwip_close(struct dfs_fd* file) +int dfs_net_close(struct dfs_fd* file) { int sock; int result; @@ -78,9 +79,9 @@ int dfs_lwip_close(struct dfs_fd* file) return -result; } -static const struct dfs_filesystem_operation _lwip_fs_ops = +static const struct dfs_filesystem_operation _net_fs_ops = { - "lwip", + "net", DFS_FS_FLAG_DEFAULT, RT_NULL, /* mount */ RT_NULL, /* unmont */ @@ -88,10 +89,10 @@ static const struct dfs_filesystem_operation _lwip_fs_ops = RT_NULL, /* statfs */ RT_NULL, /* open */ - dfs_lwip_close, - dfs_lwip_ioctl, - dfs_lwip_read, - dfs_lwip_write, + dfs_net_close, + dfs_net_ioctl, + dfs_net_read, + dfs_net_write, RT_NULL, RT_NULL, /* lseek */ RT_NULL, /* getdents */ @@ -100,28 +101,28 @@ static const struct dfs_filesystem_operation _lwip_fs_ops = RT_NULL, /* rename */ }; -static struct dfs_filesystem _lwip_fs = +static struct dfs_filesystem _net_fs = { 0, /* dev_id */ RT_NULL, /* path */ - &_lwip_fs_ops, + &_net_fs_ops, RT_NULL /* data */ }; -struct dfs_filesystem* dfs_lwip_get_fs(void) +struct dfs_filesystem* dfs_net_get_fs(void) { - return &_lwip_fs; + return &_net_fs; } /* NOTE: Beause we don't need to mount lwIP file system, the filesystem_ops is not registered to the system. -int dfs_lwip_system_init(void) +int dfs_net_system_init(void) { - dfs_register(&_lwip_fs_ops); + dfs_register(&_net_fs_ops); return 0; } -INIT_FS_EXPORT(dfs_lwip_system_init); +INIT_FS_EXPORT(dfs_net_system_init); */ diff --git a/components/dfs/filesystems/lwip/dfs_lwip.h b/components/dfs/filesystems/net/dfs_net.h similarity index 77% rename from components/dfs/filesystems/lwip/dfs_lwip.h rename to components/dfs/filesystems/net/dfs_net.h index 0c100f9d34..d98b719b89 100644 --- a/components/dfs/filesystems/lwip/dfs_lwip.h +++ b/components/dfs/filesystems/net/dfs_net.h @@ -1,7 +1,7 @@ /* - * File : dfs_lwip.h + * File : dfs_net.h * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2015, RT-Thread Development Team + * COPYRIGHT (C) 2015-2016, RT-Thread Development Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,10 +20,11 @@ * Change Logs: * Date Author Notes * 2015-02-17 Bernard First version + * 2016-05-05 Bernard rename dfs_lwip to dfs_net. */ -#ifndef DFS_LWIP_H__ -#define DFS_LWIP_H__ +#ifndef DFS_NET_H__ +#define DFS_NET_H__ #ifdef __cplusplus extern "C" { @@ -31,10 +32,10 @@ extern "C" { #include -struct dfs_filesystem* dfs_lwip_get_fs(void); -int dfs_lwip_getsocket(int fd); +struct dfs_filesystem* dfs_net_get_fs(void); +int dfs_net_getsocket(int fd); -int dfs_lwip_system_init(void); +int dfs_net_system_init(void); #ifdef __cplusplus } diff --git a/components/dfs/filesystems/lwip/lwip_netdb.c b/components/dfs/filesystems/net/net_netdb.c similarity index 100% rename from components/dfs/filesystems/lwip/lwip_netdb.c rename to components/dfs/filesystems/net/net_netdb.c diff --git a/components/dfs/filesystems/lwip/lwip_select.c b/components/dfs/filesystems/net/net_select.c similarity index 98% rename from components/dfs/filesystems/lwip/lwip_select.c rename to components/dfs/filesystems/net/net_select.c index 31d9190cfc..d19ff0ed1b 100644 --- a/components/dfs/filesystems/lwip/lwip_select.c +++ b/components/dfs/filesystems/net/net_select.c @@ -27,7 +27,7 @@ #ifdef RT_USING_LWIP -#include "dfs_lwip.h" +#include "dfs_net.h" int select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, @@ -48,7 +48,7 @@ select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, for (index = 0; index < maxfdp1; index ++) { /* convert fd to sock */ - sock = dfs_lwip_getsocket(index); + sock = dfs_net_getsocket(index); if (sock == -1) continue; if (sock > maxfd) maxfd = sock; diff --git a/components/dfs/filesystems/lwip/lwip_sockets.c b/components/dfs/filesystems/net/net_sockets.c similarity index 89% rename from components/dfs/filesystems/lwip/lwip_sockets.c rename to components/dfs/filesystems/net/net_sockets.c index 6b68378f7d..2a5a385ece 100644 --- a/components/dfs/filesystems/lwip/lwip_sockets.c +++ b/components/dfs/filesystems/net/net_sockets.c @@ -28,12 +28,12 @@ #include -#include "dfs_lwip.h" +#include "dfs_net.h" int accept(int s, struct sockaddr *addr, socklen_t *addrlen) { int new_client = -1; - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); new_client = lwip_accept(sock, addr, addrlen); if (new_client != -1) @@ -58,7 +58,7 @@ int accept(int s, struct sockaddr *addr, socklen_t *addrlen) d->type = FT_SOCKET; d->path = RT_NULL; - d->fs = dfs_lwip_get_fs(); + d->fs = dfs_net_get_fs(); d->flags = DFS_O_RDWR; /* set flags as read and write */ d->size = 0; @@ -79,7 +79,7 @@ RTM_EXPORT(accept); int bind(int s, const struct sockaddr *name, socklen_t namelen) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_bind(sock, name, namelen); } @@ -98,7 +98,7 @@ int shutdown(int s, int how) return -1; } - sock = dfs_lwip_getsocket(s); + sock = dfs_net_getsocket(s); if (lwip_shutdown(sock, how) == 0) { /* socket has been closed, delete it from file system fd */ @@ -114,7 +114,7 @@ RTM_EXPORT(shutdown); int getpeername(int s, struct sockaddr *name, socklen_t *namelen) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_getpeername(sock, name, namelen); } @@ -122,7 +122,7 @@ RTM_EXPORT(getpeername); int getsockname(int s, struct sockaddr *name, socklen_t *namelen) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_getsockname(sock, name, namelen); } @@ -130,7 +130,7 @@ RTM_EXPORT(getsockname); int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_getsockopt(sock, level, optname, optval, optlen); } @@ -138,7 +138,7 @@ RTM_EXPORT(getsockopt); int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_setsockopt(sock, level, optname, optval, optlen); } @@ -146,7 +146,7 @@ RTM_EXPORT(setsockopt); int connect(int s, const struct sockaddr *name, socklen_t namelen) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_connect(sock, name, namelen); } @@ -154,7 +154,7 @@ RTM_EXPORT(connect); int listen(int s, int backlog) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_listen(sock, backlog); } @@ -162,7 +162,7 @@ RTM_EXPORT(listen); int recv(int s, void *mem, size_t len, int flags) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_recv(sock, mem, len, flags); } @@ -171,7 +171,7 @@ RTM_EXPORT(recv); int recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_recvfrom(sock, mem, len, flags, from, fromlen); } @@ -179,7 +179,7 @@ RTM_EXPORT(recvfrom); int send(int s, const void *dataptr, size_t size, int flags) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_send(sock, dataptr, size, flags); } @@ -188,7 +188,7 @@ RTM_EXPORT(send); int sendto(int s, const void *dataptr, size_t size, int flags, const struct sockaddr *to, socklen_t tolen) { - int sock = dfs_lwip_getsocket(s); + int sock = dfs_net_getsocket(s); return lwip_sendto(sock, dataptr, size, flags, to, tolen); } diff --git a/components/dfs/filesystems/lwip/netdb.h b/components/dfs/filesystems/net/netdb.h similarity index 100% rename from components/dfs/filesystems/lwip/netdb.h rename to components/dfs/filesystems/net/netdb.h diff --git a/components/dfs/filesystems/lwip/netinet/in.h b/components/dfs/filesystems/net/netinet/in.h similarity index 100% rename from components/dfs/filesystems/lwip/netinet/in.h rename to components/dfs/filesystems/net/netinet/in.h diff --git a/components/dfs/filesystems/lwip/netinet/tcp.h b/components/dfs/filesystems/net/netinet/tcp.h similarity index 100% rename from components/dfs/filesystems/lwip/netinet/tcp.h rename to components/dfs/filesystems/net/netinet/tcp.h diff --git a/components/dfs/filesystems/lwip/netinet/udp.h b/components/dfs/filesystems/net/netinet/udp.h similarity index 100% rename from components/dfs/filesystems/lwip/netinet/udp.h rename to components/dfs/filesystems/net/netinet/udp.h diff --git a/components/dfs/filesystems/lwip/sys/select.h b/components/dfs/filesystems/net/sys/select.h similarity index 100% rename from components/dfs/filesystems/lwip/sys/select.h rename to components/dfs/filesystems/net/sys/select.h diff --git a/components/dfs/filesystems/lwip/sys/socket.h b/components/dfs/filesystems/net/sys/socket.h similarity index 100% rename from components/dfs/filesystems/lwip/sys/socket.h rename to components/dfs/filesystems/net/sys/socket.h diff --git a/components/libc/SConscript b/components/libc/SConscript index 4ed1dde123..a7913ed744 100644 --- a/components/libc/SConscript +++ b/components/libc/SConscript @@ -17,4 +17,7 @@ else: if rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim': objs = objs + SConscript('minilibc/SConscript') +objs = objs + SConscript('pthreads/SConscript') +objs = objs + SConscript('libdl/SConscript') + Return('objs') diff --git a/components/libdl/SConscript b/components/libc/libdl/SConscript similarity index 66% rename from components/libdl/SConscript rename to components/libc/libdl/SConscript index 4b16063eb3..f7f588858a 100644 --- a/components/libdl/SConscript +++ b/components/libc/libdl/SConscript @@ -1,9 +1,9 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * src = Glob('*.c') -CPPPATH = [RTT_ROOT + '/components/libdl'] +cwd = GetCurrentDir() +CPPPATH = [cwd] + group = DefineGroup('libdl', src, depend = ['RT_USING_MODULE', 'RT_USING_LIBDL'], CPPPATH = CPPPATH) Return('group') diff --git a/components/libdl/dlclose.c b/components/libc/libdl/dlclose.c similarity index 100% rename from components/libdl/dlclose.c rename to components/libc/libdl/dlclose.c diff --git a/components/libdl/dlerror.c b/components/libc/libdl/dlerror.c similarity index 100% rename from components/libdl/dlerror.c rename to components/libc/libdl/dlerror.c diff --git a/components/libdl/dlfcn.h b/components/libc/libdl/dlfcn.h similarity index 100% rename from components/libdl/dlfcn.h rename to components/libc/libdl/dlfcn.h diff --git a/components/libdl/dlopen.c b/components/libc/libdl/dlopen.c similarity index 100% rename from components/libdl/dlopen.c rename to components/libc/libdl/dlopen.c diff --git a/components/libdl/dlsym.c b/components/libc/libdl/dlsym.c similarity index 100% rename from components/libdl/dlsym.c rename to components/libc/libdl/dlsym.c diff --git a/components/libc/newlib/syscalls.c b/components/libc/newlib/syscalls.c index b5d4ec5bf6..55c19ccee9 100644 --- a/components/libc/newlib/syscalls.c +++ b/components/libc/newlib/syscalls.c @@ -450,5 +450,15 @@ void __libc_init_array(void) void abort(void) { - return ; + if (rt_thread_self()) + { + rt_thread_t self = rt_thread_self(); + + rt_kprintf("thread:%-8.*s abort!\n", RT_NAME_MAX, self->name); + rt_thread_suspend(self); + + rt_schedule(); + } + + while (1); } diff --git a/components/pthreads/SConscript b/components/libc/pthreads/SConscript similarity index 71% rename from components/pthreads/SConscript rename to components/libc/pthreads/SConscript index f220fb1992..9023e12c13 100644 --- a/components/pthreads/SConscript +++ b/components/libc/pthreads/SConscript @@ -1,8 +1,9 @@ -Import('RTT_ROOT') from building import * +cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [RTT_ROOT + '/components/pthreads'] +CPPPATH = [cwd] + group = DefineGroup('pthreads', src, depend = ['RT_USING_PTHREADS', 'RT_USING_LIBC'], CPPPATH = CPPPATH) Return('group') diff --git a/components/pthreads/clock_time.c b/components/libc/pthreads/clock_time.c similarity index 100% rename from components/pthreads/clock_time.c rename to components/libc/pthreads/clock_time.c diff --git a/components/pthreads/mqueue.c b/components/libc/pthreads/mqueue.c similarity index 100% rename from components/pthreads/mqueue.c rename to components/libc/pthreads/mqueue.c diff --git a/components/pthreads/mqueue.h b/components/libc/pthreads/mqueue.h similarity index 100% rename from components/pthreads/mqueue.h rename to components/libc/pthreads/mqueue.h diff --git a/components/pthreads/posix_types.h b/components/libc/pthreads/posix_types.h similarity index 100% rename from components/pthreads/posix_types.h rename to components/libc/pthreads/posix_types.h diff --git a/components/pthreads/pthread.c b/components/libc/pthreads/pthread.c similarity index 100% rename from components/pthreads/pthread.c rename to components/libc/pthreads/pthread.c diff --git a/components/pthreads/pthread.h b/components/libc/pthreads/pthread.h similarity index 100% rename from components/pthreads/pthread.h rename to components/libc/pthreads/pthread.h diff --git a/components/pthreads/pthread_attr.c b/components/libc/pthreads/pthread_attr.c similarity index 100% rename from components/pthreads/pthread_attr.c rename to components/libc/pthreads/pthread_attr.c diff --git a/components/pthreads/pthread_barrier.c b/components/libc/pthreads/pthread_barrier.c similarity index 100% rename from components/pthreads/pthread_barrier.c rename to components/libc/pthreads/pthread_barrier.c diff --git a/components/pthreads/pthread_cond.c b/components/libc/pthreads/pthread_cond.c similarity index 100% rename from components/pthreads/pthread_cond.c rename to components/libc/pthreads/pthread_cond.c diff --git a/components/pthreads/pthread_internal.h b/components/libc/pthreads/pthread_internal.h similarity index 100% rename from components/pthreads/pthread_internal.h rename to components/libc/pthreads/pthread_internal.h diff --git a/components/pthreads/pthread_mutex.c b/components/libc/pthreads/pthread_mutex.c similarity index 100% rename from components/pthreads/pthread_mutex.c rename to components/libc/pthreads/pthread_mutex.c diff --git a/components/pthreads/pthread_rwlock.c b/components/libc/pthreads/pthread_rwlock.c similarity index 100% rename from components/pthreads/pthread_rwlock.c rename to components/libc/pthreads/pthread_rwlock.c diff --git a/components/pthreads/pthread_spin.c b/components/libc/pthreads/pthread_spin.c similarity index 100% rename from components/pthreads/pthread_spin.c rename to components/libc/pthreads/pthread_spin.c diff --git a/components/pthreads/pthread_tls.c b/components/libc/pthreads/pthread_tls.c similarity index 100% rename from components/pthreads/pthread_tls.c rename to components/libc/pthreads/pthread_tls.c diff --git a/components/pthreads/sched.c b/components/libc/pthreads/sched.c similarity index 100% rename from components/pthreads/sched.c rename to components/libc/pthreads/sched.c diff --git a/components/pthreads/sched.h b/components/libc/pthreads/sched.h similarity index 100% rename from components/pthreads/sched.h rename to components/libc/pthreads/sched.h diff --git a/components/pthreads/semaphore.c b/components/libc/pthreads/semaphore.c similarity index 100% rename from components/pthreads/semaphore.c rename to components/libc/pthreads/semaphore.c diff --git a/components/pthreads/semaphore.h b/components/libc/pthreads/semaphore.h similarity index 100% rename from components/pthreads/semaphore.h rename to components/libc/pthreads/semaphore.h diff --git a/components/net/lwip-1.4.1/src/arch/include/arch/cc.h b/components/net/lwip-1.4.1/src/arch/include/arch/cc.h index a4dc1732f8..02b2f43907 100644 --- a/components/net/lwip-1.4.1/src/arch/include/arch/cc.h +++ b/components/net/lwip-1.4.1/src/arch/include/arch/cc.h @@ -76,7 +76,7 @@ typedef rt_uint32_t mem_ptr_t; #define LWIP_TIMEVAL_PRIVATE 1 #endif -#if defined(RT_USING_DFS_LWIP) +#if defined(RT_USING_DFS_NET) #define LWIP_COMPAT_SOCKETS 0 #endif