Skip to content

Commit

Permalink
add inline to avoid warning
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwu committed Apr 29, 2015
1 parent 0bfac3e commit f812ca8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions simplethread.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ static void thread_event_wait(struct thread_event *ev);
#define INLINE inline
#endif

static DWORD WINAPI
static DWORD INLINE WINAPI
thread_function(LPVOID lpParam) {
struct thread * t = (struct thread *)lpParam;
t->func(t->ud);
return 0;
}

static void
static INLINE void
thread_join(struct thread * threads, int n) {
int i;
HANDLE *thread_handle = (HANDLE *)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,n*sizeof(HANDLE));
Expand Down Expand Up @@ -80,14 +80,14 @@ thread_event_wait(struct thread_event *ev) {

#include <pthread.h>

static void *
static inline void *
thread_function(void * args) {
struct thread * t = (struct thread *)args;
t->func(t->ud);
return NULL;
}

static void
static inline void
thread_join(struct thread *threads, int n) {
pthread_t pid[n];
int i;
Expand Down

0 comments on commit f812ca8

Please sign in to comment.