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

Side by Side Diff: src/platform.h

Issue 6525028: Cygwin support (Closed)
Patch Set: Use sampler from platform-win32.cc Created 9 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // method is called the new thread starts running the run() method in the new 376 // method is called the new thread starts running the run() method in the new
377 // thread. The Thread object should not be deallocated before the thread has 377 // thread. The Thread object should not be deallocated before the thread has
378 // terminated. 378 // terminated.
379 379
380 class Thread: public ThreadHandle { 380 class Thread: public ThreadHandle {
381 public: 381 public:
382 // Opaque data type for thread-local storage keys. 382 // Opaque data type for thread-local storage keys.
383 // LOCAL_STORAGE_KEY_MIN_VALUE and LOCAL_STORAGE_KEY_MAX_VALUE are specified 383 // LOCAL_STORAGE_KEY_MIN_VALUE and LOCAL_STORAGE_KEY_MAX_VALUE are specified
384 // to ensure that enumeration type has correct value range (see Issue 830 for 384 // to ensure that enumeration type has correct value range (see Issue 830 for
385 // more details). 385 // more details).
386 #ifdef __CYGWIN__
Vyacheslav Egorov (Chromium) 2011/02/17 14:00:48 I understand pthread_key_t is actually a pointer o
387 typedef void* LocalStorageKey;
388 #else
386 enum LocalStorageKey { 389 enum LocalStorageKey {
387 LOCAL_STORAGE_KEY_MIN_VALUE = kMinInt, 390 LOCAL_STORAGE_KEY_MIN_VALUE = kMinInt,
388 LOCAL_STORAGE_KEY_MAX_VALUE = kMaxInt 391 LOCAL_STORAGE_KEY_MAX_VALUE = kMaxInt
389 }; 392 };
393 #endif
390 394
391 // Create new thread. 395 // Create new thread.
392 Thread(); 396 Thread();
393 explicit Thread(const char* name); 397 explicit Thread(const char* name);
394 virtual ~Thread(); 398 virtual ~Thread();
395 399
396 // Start new thread by calling the Run() method in the new thread. 400 // Start new thread by calling the Run() method in the new thread.
397 void Start(); 401 void Start();
398 402
399 // Wait until thread terminates. 403 // Wait until thread terminates.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 PlatformData* data_; // Platform specific data. 631 PlatformData* data_; // Platform specific data.
628 int samples_taken_; // Counts stack samples taken. 632 int samples_taken_; // Counts stack samples taken.
629 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 633 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
630 }; 634 };
631 635
632 #endif // ENABLE_LOGGING_AND_PROFILING 636 #endif // ENABLE_LOGGING_AND_PROFILING
633 637
634 } } // namespace v8::internal 638 } } // namespace v8::internal
635 639
636 #endif // V8_PLATFORM_H_ 640 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/platform-cygwin.cc » ('j') | src/platform-cygwin.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698