summaryrefslogtreecommitdiffstats
path: root/base/platform_thread.h
Commit message (Collapse)AuthorAgeFilesLines
* Added a new method CreateNonJoinable() to PlatformThread. Added the windows ↵willchan@chromium.org2009-03-051-1/+5
| | | | | | | | and posix implementations. Review URL: http://codereview.chromium.org/40133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11053 0039d316-1c4b-4281-b951-d872f2087c98
* Use PlatformThreadId, not int when dealing with thread ids.agl@chromium.org2009-01-231-1/+10
| | | | | | | | | | | | | | | | | Windows uses a DWORD (unsigned long) for thread ids and POSIX uses a pid_t (int on Linux) for the same. In the code, we are currently stuffing thread ids into an int which is dangerous on Windows (because DWORDS can exceed an int and wrap) and will break if pid_t is ever != int. This change changes all the places where we currently have an int to use a new typedef, PlatformThreadId. This change also needs to occur for process ids, but I'm not doing that in this CL. Review URL: http://codereview.chromium.org/18677 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8525 0039d316-1c4b-4281-b951-d872f2087c98
* Make PlatformThread::SetName operate only on the current thread.deanm@google.com2008-08-251-3/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1306 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Properly initialize PlatformThreadHandle. The Open Group Base ↵deanm@google.com2008-08-221-2/+4
| | | | | | Specifications Issue 6 states that pthread_t cannot be assumed to be a numeric type. It should be safe to value initialize it with (), even if it's a structure. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1226 0039d316-1c4b-4281-b951-d872f2087c98
* Create a simple abstraction to a native OS thread, mostly useful for ↵deanm@google.com2008-08-221-2/+6
| | | | | | unittesting when you don't want a message loop. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1217 0039d316-1c4b-4281-b951-d872f2087c98
* Port the Thread class properly to Mac and Linux. This involved portingdarin@google.com2008-08-211-14/+32
| | | | | | | | | | | | PlatformThread and creating an API on PlatformThread to create a native thread and later join with it. I also made a few other tweaks to PlatformThread, such as eliminating the Current() method which appears to be unused. The operator==() is also unused, so I killed it as well. I made a few other miscellaneous cleanups and adjustments. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1146 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for mac and linux. Fix gcc warning about class with virtual functions ↵pinkerton@google.com2008-08-131-0/+3
| | | | | | and no virtual dtor. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@842 0039d316-1c4b-4281-b951-d872f2087c98
* Add a cross-platform sleep API. We don't use TimeDeltapaulg@google.com2008-08-131-0/+3
| | | | | | here to avoid linking to winmm.dll. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@772 0039d316-1c4b-4281-b951-d872f2087c98
* rollback r749darin@google.com2008-08-121-5/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@759 0039d316-1c4b-4281-b951-d872f2087c98
* Provide a cross platform sleep API.paulg@google.com2008-08-121-0/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@749 0039d316-1c4b-4281-b951-d872f2087c98
* Add defines for the size of wchar_t to build_config.h. Use this in places ↵brettw@google.com2008-08-071-7/+12
| | | | | | | | | | where we currently have an OS-specific check. Remove all WIN32 ifdefs from base and replace them with proper defined(OS...). I also fixed random style bits when I encountered them. I made major style fixes to string16. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@524 0039d316-1c4b-4281-b951-d872f2087c98
* Add YieldCurrentThread to PlatformThread, for giving up the current thread's ↵deanm@google.com2008-08-061-0/+3
| | | | | | timeslice. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@423 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+53
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98