Skip to content

Commit

Permalink
Merge pull request Samsung#2383 from sunghan-chang/pthread
Browse files Browse the repository at this point in the history
pthread: refactoring pthread APIs to fit POSIX standard
  • Loading branch information
sangwon03 authored Oct 30, 2018
2 parents bc8c2e2 + 6120d5e commit 2a87c4d
Show file tree
Hide file tree
Showing 159 changed files with 586 additions and 344 deletions.
3 changes: 3 additions & 0 deletions apps/examples/aws/aws_sample_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@
****************************************************************************/

#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#include <apps/shell/tash.h>

/****************************************************************************
Expand Down
4 changes: 3 additions & 1 deletion apps/examples/curl_test/curl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
* Included Files
****************************************************************************/
#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

#include <curl/curl.h>

#define CURL_TASH_PRI 100
#define CURL_TASH_STAKSIZE 10240
Expand Down
1 change: 1 addition & 0 deletions apps/examples/dtls_client/dtls_client_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* Included Files
****************************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <string.h>

Expand Down
1 change: 1 addition & 0 deletions apps/examples/dtls_server/dtls_server_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* Included Files
****************************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Expand Down
7 changes: 4 additions & 3 deletions apps/examples/fs_helper/procfs_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
/****************************************************************************
* Included Files
****************************************************************************/
#include <tinyara/config.h>

#include <sys/types.h>
#include <sys/mount.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <sys/mount.h>

#include <tinyara/config.h>

/****************************************************************************
* Pre-processor Definitions
Expand Down
4 changes: 3 additions & 1 deletion apps/examples/fs_helper/ramfs_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
/****************************************************************************
* Included Files
****************************************************************************/
#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>

#include <tinyara/config.h>
#include <tinyara/fs/mtd.h>

/****************************************************************************
Expand Down
1 change: 1 addition & 0 deletions apps/examples/fs_helper/romfs_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/****************************************************************************
* Included Files
****************************************************************************/
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
Expand Down
5 changes: 4 additions & 1 deletion apps/examples/fs_helper/write_remove_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
/****************************************************************************
* Included Files
****************************************************************************/
#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <pthread.h>

#include <tinyara/config.h>
#include <tinyara/fs/fs_utils.h>

/****************************************************************************
Expand Down
2 changes: 2 additions & 0 deletions apps/examples/ftpc/ftpc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@
* Included Files
****************************************************************************/

#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>

#include "ftpc.h"

/****************************************************************************
Expand Down
2 changes: 2 additions & 0 deletions apps/examples/iotivity_simpleserver/simpleServer.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
*/

#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions apps/examples/kernel_sample/barrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* Included Files
****************************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
Expand Down
1 change: 1 addition & 0 deletions apps/examples/kernel_sample/cancel.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <time.h>
#include <pthread.h>
Expand Down
4 changes: 3 additions & 1 deletion apps/examples/kernel_sample/cond.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@
*
***********************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <pthread.h>

#include "kernel_sample.h"

#ifndef NULL
Expand Down
4 changes: 4 additions & 0 deletions apps/examples/kernel_sample/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@

#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
Expand All @@ -65,6 +66,9 @@
#include <mqueue.h>
#include <sched.h>
#include <errno.h>
#ifndef CONFIG_DISABLE_SIGNALS
#include <signal.h>
#endif

#include "kernel_sample.h"

Expand Down
2 changes: 2 additions & 0 deletions apps/examples/kernel_sample/mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@
*
***********************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <pthread.h>

#include "kernel_sample.h"

#ifndef NULL
Expand Down
1 change: 1 addition & 0 deletions apps/examples/kernel_sample/nsem.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* Included Files
***********************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <fcntl.h>
#include <pthread.h>
Expand Down
1 change: 1 addition & 0 deletions apps/examples/kernel_sample/prioinherit.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* Included Files
****************************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <semaphore.h>
Expand Down
2 changes: 2 additions & 0 deletions apps/examples/kernel_sample/rmutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@
*
***********************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <pthread.h>

#include "kernel_sample.h"

#ifndef NULL
Expand Down
3 changes: 3 additions & 0 deletions apps/examples/kernel_sample/roundrobin.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@
********************************************************************************/

#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <stdbool.h>

#include "kernel_sample.h"

#if CONFIG_RR_INTERVAL > 0
Expand Down
2 changes: 2 additions & 0 deletions apps/examples/kernel_sample/sem.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@
* Included Files
***********************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <pthread.h>
#include <semaphore.h>
#include <sched.h>

#include "kernel_sample.h"

/***********************************************************************
Expand Down
1 change: 1 addition & 0 deletions apps/examples/kernel_sample/semtimed.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* Included Files
***********************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <pthread.h>
#include <semaphore.h>
Expand Down
1 change: 1 addition & 0 deletions apps/examples/kernel_sample/timedmqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@

#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions apps/examples/kernel_sample/timedwait.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* Included Files
**************************************************************************/

#include <sys/types.h>
#include <stdio.h>
#include <time.h>
#include <pthread.h>
Expand Down
3 changes: 3 additions & 0 deletions apps/examples/st_things/blink/blink.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
******************************************************************/

#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>

#include <tinyara/gpio.h>
#include <iotbus/iotbus_gpio.h>

Expand Down
1 change: 1 addition & 0 deletions apps/examples/testcase/le_tc/filesystem/fs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <signal.h>
#include <dirent.h>
#include <fcntl.h>
#include <string.h>
Expand Down
4 changes: 4 additions & 0 deletions apps/examples/testcase/le_tc/kernel/tc_libc_stdlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@
* Included Files
****************************************************************************/
#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <errno.h>
#include <inttypes.h>

#include "tc_internal.h"

#define NVAL1 1000
Expand Down
3 changes: 3 additions & 0 deletions apps/examples/testcase/le_tc/kernel/tc_memory_safety.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
#include <errno.h>
#include <sys/types.h>
#include <ctype.h>
#ifndef CONFIG_DISABLE_SIGNALS
#include <signal.h>
#endif
#include <fcntl.h>
#include <mqueue.h>
#include <sched.h>
Expand Down
3 changes: 3 additions & 0 deletions apps/examples/testcase/le_tc/kernel/tc_mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
#include <errno.h>
#include <sys/types.h>
#include <ctype.h>
#ifndef CONFIG_DISABLE_SIGNALS
#include <signal.h>
#endif
#include <fcntl.h>
#include "tc_internal.h"

Expand Down
1 change: 1 addition & 0 deletions apps/examples/testcase/le_tc/kernel/tc_pthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sched.h>
#include <pthread.h>
#include <errno.h>
Expand Down
5 changes: 5 additions & 0 deletions apps/examples/testcase/le_tc/kernel/tc_tash_heapinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@
* Included Files
****************************************************************************/
#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <pthread.h>

#include <tinyara/mm/mm.h>
#include <apps/shell/tash.h>

#include "tc_internal.h"

#define DEFAULT_STKSIZE 1024
Expand Down
5 changes: 5 additions & 0 deletions apps/examples/testcase/le_tc/kernel/tc_tash_stackmonitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@
* Included Files
****************************************************************************/
#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <sched.h>
#include <pthread.h>

#include <apps/shell/tash.h>

#include "tc_internal.h"

#define DEFAULT_STKSIZE 1024
Expand Down
11 changes: 6 additions & 5 deletions apps/examples/testcase/le_tc/network/tc_net_getpeername.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@
// @file tc_net_getpeername.c
// @brief Test Case Example for getpeername() API
#include <tinyara/config.h>
#include <stdio.h>
#include <errno.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <stdio.h>
#include <errno.h>
#include <pthread.h>
#include <net/if.h>
#include <arpa/inet.h>
#include <netinet/in.h>

//#include <arch/board/board.h>
#include <netutils/netlib.h>

#include <sys/socket.h>

#include "tc_internal.h"
#include <pthread.h>

#define PORTNUM 1115
#define MAXRCVLEN 20
Expand Down
7 changes: 5 additions & 2 deletions apps/examples/testcase/le_tc/tcp_tls/tcp_tls_stress.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@
****************************************************************************/

#include <tinyara/config.h>

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wifi_manager/wifi_manager.h>
#include <stress_tool/st_perf.h>
#include <netdb.h>
#include <pthread.h>

#include <wifi_manager/wifi_manager.h>
#include <stress_tool/st_perf.h>

#include "mbedtls/config.h"
#include "mbedtls/net.h"
#include "mbedtls/ssl.h"
Expand Down
Loading

0 comments on commit 2a87c4d

Please sign in to comment.