From 714f00679eed2c8d1e758c768cf7af57944a5f08 Mon Sep 17 00:00:00 2001 From: weety Date: Tue, 31 May 2016 20:22:59 +0800 Subject: [PATCH 1/2] Fixed crlf issue. --- .../sdk/common/usb_stack/Device/source/driver/mx6x/usb_ch9.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/imx6sx/iMX6_Platform_SDK/sdk/common/usb_stack/Device/source/driver/mx6x/usb_ch9.h b/bsp/imx6sx/iMX6_Platform_SDK/sdk/common/usb_stack/Device/source/driver/mx6x/usb_ch9.h index c7efae1823..8feda063c0 100755 --- a/bsp/imx6sx/iMX6_Platform_SDK/sdk/common/usb_stack/Device/source/driver/mx6x/usb_ch9.h +++ b/bsp/imx6sx/iMX6_Platform_SDK/sdk/common/usb_stack/Device/source/driver/mx6x/usb_ch9.h @@ -169,5 +169,5 @@ typedef struct usb_string_descriptor { unsigned char bDescriptorType; /*STRING Descriptor Type, must be 0x3 */ unsigned char *pString; /*pointer to the start address of the string, the string lenth is (bLength-2) */ } usb_string_descriptor_t; - + #endif /*USB_CH9_H_*/ From 62e770f9de9f6a208f01b6458e54d2400699238e Mon Sep 17 00:00:00 2001 From: weety Date: Tue, 31 May 2016 20:39:33 +0800 Subject: [PATCH 2/2] Fixed 64KB stack size limit. --- components/libc/pthreads/pthread.h | 2 +- include/rtdef.h | 2 +- src/thread.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/libc/pthreads/pthread.h b/components/libc/pthreads/pthread.h index 7481595682..2674599aac 100644 --- a/components/libc/pthreads/pthread.h +++ b/components/libc/pthreads/pthread.h @@ -87,7 +87,7 @@ enum struct pthread_attr { void* stack_base; - rt_uint16_t stack_size; /* stack size of thread */ + rt_uint32_t stack_size; /* stack size of thread */ rt_uint8_t priority; /* priority of thread */ rt_uint8_t detachstate; /* detach state */ diff --git a/include/rtdef.h b/include/rtdef.h index a3dad27989..403db78099 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -496,7 +496,7 @@ struct rt_thread void *entry; /**< entry */ void *parameter; /**< parameter */ void *stack_addr; /**< stack address */ - rt_uint16_t stack_size; /**< stack size */ + rt_uint32_t stack_size; /**< stack size */ /* error code */ rt_err_t error; /**< error code */ diff --git a/src/thread.c b/src/thread.c index 832bd7502a..487c005b65 100644 --- a/src/thread.c +++ b/src/thread.c @@ -98,7 +98,7 @@ static rt_err_t _rt_thread_init(struct rt_thread *thread, /* stack init */ thread->stack_addr = stack_start; - thread->stack_size = (rt_uint16_t)stack_size; + thread->stack_size = stack_size; /* init thread stack */ rt_memset(thread->stack_addr, '#', thread->stack_size);