comparison w32thread.c @ 5542:b0a566346fb1 libavcodec

Add attribute that forces alignment of stack to functions that need it. Necessary for systems that don't align by default to 16 bytes, required by some SSE instructions. Requires GCC >= 4.2. Based on patch by Ga¸«³l Chardon.
author ramiro
date Mon, 13 Aug 2007 15:28:29 +0000
parents 2b72f9bc4f06
children 6815571afbcf
comparison
equal deleted inserted replaced
5541:6c385356e61f 5542:b0a566346fb1
34 void *arg; 34 void *arg;
35 int ret; 35 int ret;
36 }ThreadContext; 36 }ThreadContext;
37 37
38 38
39 static unsigned __stdcall thread_func(void *v){ 39 static unsigned __stdcall attribute_align_arg thread_func(void *v){
40 ThreadContext *c= v; 40 ThreadContext *c= v;
41 41
42 for(;;){ 42 for(;;){
43 //printf("thread_func %X enter wait\n", (int)v); fflush(stdout); 43 //printf("thread_func %X enter wait\n", (int)v); fflush(stdout);
44 WaitForSingleObject(c->work_sem, INFINITE); 44 WaitForSingleObject(c->work_sem, INFINITE);