summaryrefslogtreecommitdiffstats
path: root/base/platform_thread_posix.cc
Commit message (Collapse)AuthorAgeFilesLines
* posix: set thread namesevan@chromium.org2010-06-101-8/+50
| | | | | | | | | | | | | | | | There's a non-portable function for doing this: pthread_setname_np. It's supported by OS X >= 10.6 and the Xcode debugger will show the thread names if they're provided. On Linux, support has just recently been added to glibc for the same function. Since OS coverage of the function is so spotty, we look for the symbol at runtime; on Linux we fall back to another implementation of the same functionality if the function isn't available. [reland of r49212, with Mac fixed and Linux disabled; see comments in code as to why Linux is disabled] Review URL: http://codereview.chromium.org/2774001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49465 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "posix: set thread names"evan@chromium.org2010-06-081-46/+8
| | | | | | This reverts commit r49212. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49214 0039d316-1c4b-4281-b951-d872f2087c98
* posix: set thread namesevan@chromium.org2010-06-081-8/+46
| | | | | | | | | | | | | There's a non-portable function for doing this: pthread_setname_np. It's supported by OS X >= 10.6 and the Xcode debugger will show the thread names if they're provided. On Linux, support has just recently been added to glibc for the same function. Since OS coverage of the function is so spotty, we look for the symbol at runtime; on Linux we fall back to another implementation of the same functionality if the function isn't available. Review URL: http://codereview.chromium.org/2774001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49212 0039d316-1c4b-4281-b951-d872f2087c98
* Use a reasonable default pthread stack size on Mac OS X.mark@chromium.org2010-05-071-0/+33
| | | | | | | | | | | | | Mac OS X uses a fixed default stack size of 512kB, which is too small for some purposes. glibc on Linux uses ulimit -s, which is both a more reasonable thing to do, and is generally set to a rational limit, such as 8MB. BUG=43422 TEST=None really on the trunk. On the Mac 375 branch, using the .pac file on the bug, Chrome should not crash on startup. Review URL: http://codereview.chromium.org/2035007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46717 0039d316-1c4b-4281-b951-d872f2087c98
* Changes to base/ from a combination of FreeBSD and OpenBSD patches.evan@chromium.org2009-12-291-1/+4
| | | | | | Review URL: http://codereview.chromium.org/495002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35321 0039d316-1c4b-4281-b951-d872f2087c98
* Added a new method CreateNonJoinable() to PlatformThread. Added the windows ↵willchan@chromium.org2009-03-051-5/+28
| | | | | | | | 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
* NO CODE CHANGE (except one global std::wstring changed to const wchar_t* ↵maruel@chromium.org2009-03-031-1/+1
| | | | | | | | | | | const per style compliance). Preliminary work to enforce new PRESUBMIT.py rules: - <=80 cols - no trailing whitespaces - svn:eol-style=LF git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10791 0039d316-1c4b-4281-b951-d872f2087c98
* Use PlatformThreadId, not int when dealing with thread ids.agl@chromium.org2009-01-231-1/+1
| | | | | | | | | | | | | | | | | 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
* Ensure Cocoa sets up its multithreaded environmentmmentovai@google.com2008-08-281-3/+12
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1476 0039d316-1c4b-4281-b951-d872f2087c98
* Updated comment in thread naming.avi@google.com2008-08-251-1/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1308 0039d316-1c4b-4281-b951-d872f2087c98
* Make PlatformThread::SetName operate only on the current thread.deanm@google.com2008-08-251-1/+1
| | | | 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
* Port the Thread class properly to Mac and Linux. This involved portingdarin@google.com2008-08-211-0/+107
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