Mercurial > libavcodec.hg
comparison pthread.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 | 238b95c5ffe2 |
children | a9734fe0811e |
comparison
equal
deleted
inserted
replaced
5541:6c385356e61f | 5542:b0a566346fb1 |
---|---|
40 pthread_mutex_t current_job_lock; | 40 pthread_mutex_t current_job_lock; |
41 int current_job; | 41 int current_job; |
42 int done; | 42 int done; |
43 } ThreadContext; | 43 } ThreadContext; |
44 | 44 |
45 static void* worker(void *v) | 45 static void* attribute_align_arg worker(void *v) |
46 { | 46 { |
47 AVCodecContext *avctx = v; | 47 AVCodecContext *avctx = v; |
48 ThreadContext *c = avctx->thread_opaque; | 48 ThreadContext *c = avctx->thread_opaque; |
49 int our_job = c->job_count; | 49 int our_job = c->job_count; |
50 int thread_count = avctx->thread_count; | 50 int thread_count = avctx->thread_count; |