Reverting merge from trunk
[official-gcc.git] / libgomp / config / posix / affinity.c
blobe7f97ab08d60251e8fe4c47dcaa2512989f59c7d
1 /* Copyright (C) 2006-2013 Free Software Foundation, Inc.
2 Contributed by Jakub Jelinek <jakub@redhat.com>.
4 This file is part of the GNU OpenMP Library (libgomp).
6 Libgomp is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
11 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 more details.
16 Under Section 7 of GPL version 3, you are granted additional
17 permissions described in the GCC Runtime Library Exception, version
18 3.1, as published by the Free Software Foundation.
20 You should have received a copy of the GNU General Public License and
21 a copy of the GCC Runtime Library Exception along with this program;
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 <http://www.gnu.org/licenses/>. */
25 /* This is a generic stub implementation of a CPU affinity setting. */
27 #include "libgomp.h"
29 void
30 gomp_init_affinity (void)
34 void
35 gomp_init_thread_affinity (pthread_attr_t *attr, unsigned int place)
37 (void) attr;
38 (void) place;
41 void **
42 gomp_affinity_alloc (unsigned long count, bool quiet)
44 (void) count;
45 if (!quiet)
46 gomp_error ("Affinity not supported on this configuration");
47 return NULL;
50 void
51 gomp_affinity_init_place (void *p)
53 (void) p;
56 bool
57 gomp_affinity_add_cpus (void *p, unsigned long num,
58 unsigned long len, long stride, bool quiet)
60 (void) p;
61 (void) num;
62 (void) len;
63 (void) stride;
64 (void) quiet;
65 return false;
68 bool
69 gomp_affinity_remove_cpu (void *p, unsigned long num)
71 (void) p;
72 (void) num;
73 return false;
76 bool
77 gomp_affinity_copy_place (void *p, void *q, long stride)
79 (void) p;
80 (void) q;
81 (void) stride;
82 return false;
85 bool
86 gomp_affinity_same_place (void *p, void *q)
88 (void) p;
89 (void) q;
90 return false;
93 bool
94 gomp_affinity_finalize_place_list (bool quiet)
96 (void) quiet;
97 return false;
100 bool
101 gomp_affinity_init_level (int level, unsigned long count, bool quiet)
103 (void) level;
104 (void) count;
105 (void) quiet;
106 if (!quiet)
107 gomp_error ("Affinity not supported on this configuration");
108 return NULL;
111 void
112 gomp_affinity_print_place (void *p)
114 (void) p;