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

« back to all changes in this revision

Viewing changes to tests/test_rwlock.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:
31
31
#include <unistd.h>
32
32
#include <stdio.h>
33
33
#include <assert.h>
34
 
#include <sched.h>
35
34
#include <errno.h>
36
35
 
37
36
#include <urcu/arch.h>
38
37
#include <urcu/tls-compat.h>
 
38
#include "cpuset.h"
39
39
 
40
40
#ifdef __linux__
41
41
#include <syscall.h>
106
106
 
107
107
pthread_mutex_t affinity_mutex = PTHREAD_MUTEX_INITIALIZER;
108
108
 
109
 
#ifndef HAVE_CPU_SET_T
110
 
typedef unsigned long cpu_set_t;
111
 
# define CPU_ZERO(cpuset) do { *(cpuset) = 0; } while(0)
112
 
# define CPU_SET(cpu, cpuset) do { *(cpuset) |= (1UL << (cpu)); } while(0)
113
 
#endif
114
 
 
115
109
static void set_affinity(void)
116
110
{
117
111
        cpu_set_t mask;