Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: src/atomicops.h

Issue 10919314: Fix build on OpenBSD/i386. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // MacOS is an exception to the implicit conversion rule above, 62 // MacOS is an exception to the implicit conversion rule above,
63 // because it uses long for intptr_t. 63 // because it uses long for intptr_t.
64 typedef int64_t Atomic64; 64 typedef int64_t Atomic64;
65 #else 65 #else
66 typedef intptr_t Atomic64; 66 typedef intptr_t Atomic64;
67 #endif 67 #endif
68 #endif 68 #endif
69 69
70 // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or 70 // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or
71 // Atomic64 routines below, depending on your architecture. 71 // Atomic64 routines below, depending on your architecture.
72 #if defined(__OpenBSD__) && defined(__i386__)
73 typedef Atomic32 AtomicWord;
74 #else
72 typedef intptr_t AtomicWord; 75 typedef intptr_t AtomicWord;
76 #endif
73 77
74 // Atomically execute: 78 // Atomically execute:
75 // result = *ptr; 79 // result = *ptr;
76 // if (*ptr == old_value) 80 // if (*ptr == old_value)
77 // *ptr = new_value; 81 // *ptr = new_value;
78 // return result; 82 // return result;
79 // 83 //
80 // I.e., replace "*ptr" with "new_value" if "*ptr" used to be "old_value". 84 // I.e., replace "*ptr" with "new_value" if "*ptr" used to be "old_value".
81 // Always return the old value of "*ptr" 85 // Always return the old value of "*ptr"
82 // 86 //
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 #include "atomicops_internals_x86_gcc.h" 162 #include "atomicops_internals_x86_gcc.h"
159 #elif defined(__GNUC__) && defined(V8_HOST_ARCH_ARM) 163 #elif defined(__GNUC__) && defined(V8_HOST_ARCH_ARM)
160 #include "atomicops_internals_arm_gcc.h" 164 #include "atomicops_internals_arm_gcc.h"
161 #elif defined(__GNUC__) && defined(V8_HOST_ARCH_MIPS) 165 #elif defined(__GNUC__) && defined(V8_HOST_ARCH_MIPS)
162 #include "atomicops_internals_mips_gcc.h" 166 #include "atomicops_internals_mips_gcc.h"
163 #else 167 #else
164 #error "Atomic operations are not supported on your platform" 168 #error "Atomic operations are not supported on your platform"
165 #endif 169 #endif
166 170
167 #endif // V8_ATOMICOPS_H_ 171 #endif // V8_ATOMICOPS_H_
OLDNEW
« no previous file with comments | « no previous file | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698