MINOR: config: Add the threads support in cpu-map directive

Now, it is possible to bind CPU at the thread level instead of the process level
by defining a thread set in "cpu-map" directives. Thus, its format is now:

  cpu-map [auto:]<process-set>[/<thread-set>] <cpu-set>...

where <process-set> and <thread-set> must follow the format:

  all | odd | even | number[-[number]]

Having a process range and a thread range in same time with the "auto:" prefix
is not supported. Only one range is supported, the other one must be a fixed
number. But it is allowed when there is no "auto:" prefix.

Because it is possible to define a mapping for a process and another for a
thread on this process, threads will be bound on the intersection of their
mapping and the one of the process on which they are attached. If the
intersection is null, no specific binding will be set for the threads.
diff --git a/src/haproxy.c b/src/haproxy.c
index dca2a33..381d5a9 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -2726,12 +2726,12 @@
 #ifdef USE_CPU_AFFINITY
 		if (proc < global.nbproc &&  /* child */
 		    proc < LONGBITS &&       /* only the first 32/64 processes may be pinned */
-		    global.cpu_map[proc])    /* only do this if the process has a CPU map */
+		    global.cpu_map.proc[proc])    /* only do this if the process has a CPU map */
 #ifdef __FreeBSD__
 		{
 			cpuset_t cpuset;
 			int i;
-			unsigned long cpu_map = global.cpu_map[proc];
+			unsigned long cpu_map = global.cpu_map.proc[proc];
 
 			CPU_ZERO(&cpuset);
 			while ((i = ffsl(cpu_map)) > 0) {
@@ -2741,7 +2741,7 @@
 			ret = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset), &cpuset);
 		}
 #else
-			sched_setaffinity(0, sizeof(unsigned long), (void *)&global.cpu_map[proc]);
+			sched_setaffinity(0, sizeof(unsigned long), (void *)&global.cpu_map.proc[proc]);
 #endif
 #endif
 		/* close the pidfile both in children and father */
@@ -2895,13 +2895,14 @@
 #ifdef USE_CPU_AFFINITY
 		/* Now the CPU affinity for all threads */
 		for (i = 0; i < global.nbthread; i++) {
-			if (global.cpu_map[relative_pid-1])
-				global.thread_map[relative_pid-1][i] &= global.cpu_map[relative_pid-1];
+			if (global.cpu_map.proc[relative_pid-1])
+				global.cpu_map.thread[relative_pid-1][i] &= global.cpu_map.proc[relative_pid-1];
 
 			if (i < LONGBITS &&       /* only the first 32/64 threads may be pinned */
-			    global.thread_map[relative_pid-1][i]) /* only do this if the thread has a THREAD map */
+			    global.cpu_map.thread[relative_pid-1][i]) /* only do this if the thread has a THREAD map */
 				pthread_setaffinity_np(threads[i],
-						       sizeof(unsigned long), (void *)&global.thread_map[relative_pid-1][i]);
+						       sizeof(unsigned long),
+						       (void *)&global.cpu_map.thread[relative_pid-1][i]);
 		}
 #endif /* !USE_CPU_AFFINITY */