~ubuntu-branches/ubuntu/trusty/liburcu/trusty

« back to all changes in this revision

Viewing changes to tests/test_urcu_lfs.c

  • Committer: Package Import Robot
  • Author(s): Jon Bernard
  • Date: 2013-08-01 21:43:09 UTC
  • mfrom: (1.1.22)
  • Revision ID: package-import@ubuntu.com-20130801214309-xzzr0vswwilmywoh
Tags: 0.7.7-1
* [168b2c5] New upstream version 0.7.7
* [f07b6db] Bump Standards-Version to 3.9.4, no changes necessary
* [8f2716c] Remove backport patch for sparc, included upstream
* [10ec904] Include pkgconfig files in liburcu-dev package (Closes: #710544)
* [cfa7bd6] Prevent hiding of gcc commandline arguments

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include <unistd.h>
35
35
#include <stdio.h>
36
36
#include <assert.h>
37
 
#include <sched.h>
38
37
#include <errno.h>
39
38
 
40
39
#include <urcu/arch.h>
41
40
#include <urcu/tls-compat.h>
 
41
#include "cpuset.h"
42
42
 
43
43
#ifdef __linux__
44
44
#include <syscall.h>
98
98
 
99
99
pthread_mutex_t affinity_mutex = PTHREAD_MUTEX_INITIALIZER;
100
100
 
101
 
#ifndef HAVE_CPU_SET_T
102
 
typedef unsigned long cpu_set_t;
103
 
# define CPU_ZERO(cpuset) do { *(cpuset) = 0; } while(0)
104
 
# define CPU_SET(cpu, cpuset) do { *(cpuset) |= (1UL << (cpu)); } while(0)
105
 
#endif
106
 
 
107
101
static void set_affinity(void)
108
102
{
109
103
        cpu_set_t mask;