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

Side by Side Diff: mozilla/nsprpub/pr/include/md/_unixos.h

Issue 12089033: Update to NSPR 4.9.5 Beta 2, part 2: actual changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 10 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 | « mozilla/nsprpub/pr/include/md/_pth.h ('k') | mozilla/nsprpub/pr/include/md/_win95.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 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public 2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 #ifndef prunixos_h___ 6 #ifndef prunixos_h___
7 #define prunixos_h___ 7 #define prunixos_h___
8 8
9 /* 9 /*
10 * If FD_SETSIZE is not defined on the command line, set the default value 10 * If FD_SETSIZE is not defined on the command line, set the default value
11 * before include select.h 11 * before include select.h
12 */ 12 */
13 /* 13 /*
14 * Linux: FD_SETSIZE is defined in /usr/include/sys/select.h and should 14 * Linux: FD_SETSIZE is defined in /usr/include/sys/select.h and should
15 * not be redefined. 15 * not be redefined.
16 */ 16 */
17 #if !defined(LINUX) && !defined(__GNU__) && !defined(__GLIBC__) \ 17 #if !defined(LINUX) && !defined(__GNU__) && !defined(__GLIBC__) \
18 && !defined(DARWIN) && !defined(NEXTSTEP) 18 && !defined(DARWIN)
19 #ifndef FD_SETSIZE 19 #ifndef FD_SETSIZE
20 #define FD_SETSIZE 4096 20 #define FD_SETSIZE 4096
21 #endif 21 #endif
22 #endif 22 #endif
23 23
24 #include <unistd.h> 24 #include <unistd.h>
25 #include <stddef.h> 25 #include <stddef.h>
26 #include <sys/stat.h> 26 #include <sys/stat.h>
27 #include <dirent.h> 27 #include <dirent.h>
28 #include <errno.h> 28 #include <errno.h>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 ** Make a redzone at both ends of the stack segment. Disallow access 140 ** Make a redzone at both ends of the stack segment. Disallow access
141 ** to those pages of memory. It's ok if the mprotect call's don't 141 ** to those pages of memory. It's ok if the mprotect call's don't
142 ** work - it just means that we don't really have a functional 142 ** work - it just means that we don't really have a functional
143 ** redzone. 143 ** redzone.
144 */ 144 */
145 #include <sys/mman.h> 145 #include <sys/mman.h>
146 #ifndef PROT_NONE 146 #ifndef PROT_NONE
147 #define PROT_NONE 0x0 147 #define PROT_NONE 0x0
148 #endif 148 #endif
149 149
150 #if defined(DEBUG) && !defined(DARWIN) && !defined(NEXTSTEP) 150 #if defined(DEBUG) && !defined(DARWIN)
151 #if !defined(SOLARIS) 151 #if !defined(SOLARIS)
152 #include <string.h> /* for memset() */ 152 #include <string.h> /* for memset() */
153 #define _MD_INIT_STACK(ts,REDZONE) \ 153 #define _MD_INIT_STACK(ts,REDZONE) \
154 PR_BEGIN_MACRO \ 154 PR_BEGIN_MACRO \
155 (void) mprotect((void*)ts->seg->vaddr, REDZONE, PROT_NONE); \ 155 (void) mprotect((void*)ts->seg->vaddr, REDZONE, PROT_NONE); \
156 (void) mprotect((void*) ((char*)ts->seg->vaddr + REDZONE + ts->stackSize ),\ 156 (void) mprotect((void*) ((char*)ts->seg->vaddr + REDZONE + ts->stackSize ),\
157 REDZONE, PROT_NONE); \ 157 REDZONE, PROT_NONE); \
158 /* \ 158 /* \
159 ** Fill stack memory with something that turns into an illegal \ 159 ** Fill stack memory with something that turns into an illegal \
160 ** pointer value. This will sometimes find runtime references to \ 160 ** pointer value. This will sometimes find runtime references to \
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 extern void _MD_FreeSegment(PRSegment *seg); 287 extern void _MD_FreeSegment(PRSegment *seg);
288 288
289 #define _MD_INIT_SEGS _MD_InitSegs 289 #define _MD_INIT_SEGS _MD_InitSegs
290 #define _MD_ALLOC_SEGMENT _MD_AllocSegment 290 #define _MD_ALLOC_SEGMENT _MD_AllocSegment
291 #define _MD_FREE_SEGMENT _MD_FreeSegment 291 #define _MD_FREE_SEGMENT _MD_FreeSegment
292 292
293 #endif /* !defined(_PR_PTHREADS) */ 293 #endif /* !defined(_PR_PTHREADS) */
294 294
295 /************************************************************************/ 295 /************************************************************************/
296 296
297 #if !defined(HPUX_LW_TIMER) 297 #ifdef _MD_INTERVAL_USE_GTOD
298 extern PRIntervalTime _PR_UNIX_GetInterval(void);
299 extern PRIntervalTime _PR_UNIX_TicksPerSecond(void);
298 #define _MD_INTERVAL_INIT() 300 #define _MD_INTERVAL_INIT()
301 #define _MD_GET_INTERVAL _PR_UNIX_GetInterval
302 #define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond
299 #endif 303 #endif
304
305 #ifdef HAVE_CLOCK_MONOTONIC
306 extern PRIntervalTime _PR_UNIX_GetInterval2(void);
307 extern PRIntervalTime _PR_UNIX_TicksPerSecond2(void);
308 #define _MD_INTERVAL_INIT()
309 #define _MD_GET_INTERVAL _PR_UNIX_GetInterval2
310 #define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond2
311 #endif
312
300 #define _MD_INTERVAL_PER_MILLISEC() (_PR_MD_INTERVAL_PER_SEC() / 1000) 313 #define _MD_INTERVAL_PER_MILLISEC() (_PR_MD_INTERVAL_PER_SEC() / 1000)
301 #define _MD_INTERVAL_PER_MICROSEC() (_PR_MD_INTERVAL_PER_SEC() / 1000000) 314 #define _MD_INTERVAL_PER_MICROSEC() (_PR_MD_INTERVAL_PER_SEC() / 1000000)
302 315
303 /************************************************************************/ 316 /************************************************************************/
304 317
305 #define _MD_ERRNO() (errno) 318 #define _MD_ERRNO() (errno)
306 #define _MD_GET_SOCKET_ERROR() (errno) 319 #define _MD_GET_SOCKET_ERROR() (errno)
307 320
308 /************************************************************************/ 321 /************************************************************************/
309 322
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 { 609 {
597 _MD_Open64 _open64; 610 _MD_Open64 _open64;
598 _MD_Mmap64 _mmap64; 611 _MD_Mmap64 _mmap64;
599 _MD_Stat64 _stat64; 612 _MD_Stat64 _stat64;
600 _MD_Fstat64 _fstat64; 613 _MD_Fstat64 _fstat64;
601 _MD_Lseek64 _lseek64; 614 _MD_Lseek64 _lseek64;
602 }; 615 };
603 extern struct _MD_IOVector _md_iovector; 616 extern struct _MD_IOVector _md_iovector;
604 617
605 #endif /* prunixos_h___ */ 618 #endif /* prunixos_h___ */
OLDNEW
« no previous file with comments | « mozilla/nsprpub/pr/include/md/_pth.h ('k') | mozilla/nsprpub/pr/include/md/_win95.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698