Hello,
I am trying to compile an Android Kernel and got an error, which seems to be a fault of Intel ICC compiler semantics.
#define for_each_cpu_worker_pool(pool, cpu) \ for ((pool) = &per_cpu(cpu_worker_pools, cpu)[0]; \ (pool) < &per_cpu(cpu_worker_pools, cpu)[NR_STD_WORKER_POOLS]; \ (pool)++)
Where in a code file we have this piece then:
for_each_cpu_worker_pool(pool, cpu) { WARN_ON_ONCE(cpu != smp_processor_id()); mutex_lock(&pool->manager_mutex); spin_lock_irq(&pool->lock);
Which normally should be then replaced like this (plain and simple):
for ((pool) = &per_cpu(cpu_worker_pools, cpu)[0]; (pool) < &per_cpu(cpu_worker_pools, cpu)[NR_STD_WORKER_POOLS]; (pool)++) { WARN_ON_ONCE(cpu != smp_processor_id()); mutex_lock(&pool->manager_mutex); spin_lock_irq(&pool->lock); ...
But instead command line is throwing out this error:
workqueue.c(4989): error: expected a ")" for_each_cpu_worker_pool(pool, cpu) { ^
Can I use some workaround to fix this?