summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl/sdlwork.c
diff options
context:
space:
mode:
author Oliver Stöneberg <firewave@users.noreply.github.com>2014-09-20 08:40:48 +0000
committer Oliver Stöneberg <firewave@users.noreply.github.com>2014-09-20 08:40:48 +0000
commita841aa40543323e4504c040254684a44749b4981 (patch)
tree2bbeb5b99a3a3d4266d42b1e2804ee99cfe157be /src/osd/sdl/sdlwork.c
parent83eb94cd342957a0848287a65b5fcb68108c60b8 (diff)
removed cpu mask and thread affinity code from src/osd/sdl/sdlwork.c as suggested by couriersud (nw)
Diffstat (limited to 'src/osd/sdl/sdlwork.c')
-rw-r--r--src/osd/sdl/sdlwork.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/osd/sdl/sdlwork.c b/src/osd/sdl/sdlwork.c
index 46597db4112..f759e6a2312 100644
--- a/src/osd/sdl/sdlwork.c
+++ b/src/osd/sdl/sdlwork.c
@@ -45,7 +45,6 @@ int osd_num_processors = 0;
//============================================================
#define ENV_PROCESSORS "OSDPROCESSORS"
-#define ENV_CPUMASKS "OSDCPUMASKS"
#define ENV_WORKQUEUEMAXTHREADS "OSDWORKQUEUEMAXTHREADS"
#define INFINITE (osd_ticks_per_second() * (osd_ticks_t) 10000)
@@ -138,7 +137,6 @@ int osd_num_processors = 0;
//============================================================
static int effective_num_processors(void);
-static UINT32 effective_cpu_mask(int index);
static void * worker_thread_entry(void *param);
static void worker_thread_process(osd_work_queue *queue, work_thread_info *thread);
@@ -220,14 +218,6 @@ osd_work_queue *osd_work_queue_alloc(int flags)
osd_thread_adjust_priority(thread->handle, 1);
else
osd_thread_adjust_priority(thread->handle, 0);
-
- // Bind main thread to cpu 0
- osd_thread_cpu_affinity(NULL, effective_cpu_mask(0));
-
- if (flags & WORK_QUEUE_FLAG_IO)
- osd_thread_cpu_affinity(thread->handle, effective_cpu_mask(1));
- else
- osd_thread_cpu_affinity(thread->handle, effective_cpu_mask(2+threadnum) );
}
// start a timer going for "waittime" on the main thread
@@ -593,43 +583,6 @@ static int effective_num_processors(void)
}
}
-//============================================================
-// effective_cpu_mask
-//============================================================
-
-static UINT32 effective_cpu_mask(int index)
-{
- char *s;
- char buf[5];
- UINT32 mask = 0xFFFF;
-
- s = osd_getenv(ENV_CPUMASKS);
- if (s != NULL && strcmp(s,"none"))
- {
- if (!strcmp(s,"auto"))
- {
- if (index<2)
- mask = 0x01; /* main thread and io threads on cpu #0 */
- else
- mask = (1 << (((index - 1) % (osd_get_num_processors() - 1)) + 1));
- }
- else
- {
- if (strlen(s) % 4 != 0 || strlen(s) < (index+1)*4)
- {
- fprintf(stderr,"Invalid cpu mask @index %d: %s\n", index, s);
- }
- else
- {
- memcpy(buf,s+4*index,4);
- buf[4] = 0;
- if (sscanf(buf, "%04x", &mask) != 1)
- fprintf(stderr,"Invalid cpu mask element %d: %s\n", index, buf);
- }
- }
- }
- return mask;
-}
//============================================================
// worker_thread_entry