Skip to content

Added switch_thread_getname and switch_thread_setname functions #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7,648 commits into
base: trunk
Choose a base branch
from

Conversation

sergey-safarov
Copy link

No description provided.

jimjag and others added 30 commits January 24, 2014 15:46
a known (and therfore handable) issue


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561040 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561209 13f79535-47bb-0310-9956-ffa450edef68
     PR 55928. [Jozef Hatala <jh-asf skrt org>]


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561260 13f79535-47bb-0310-9956-ffa450edef68
the pathlength, which is much less than 255. So use
the method from posix sems, which we've used for
years!


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561265 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561347 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561361 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561384 13f79535-47bb-0310-9956-ffa450edef68
so we can fix it without breaking it.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561394 13f79535-47bb-0310-9956-ffa450edef68
FIX data corruption


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561555 13f79535-47bb-0310-9956-ffa450edef68
Introduce non-exported sys/attr.h autoconf flag for OS/X


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1567722 13f79535-47bb-0310-9956-ffa450edef68
for gen_test_char when using an old libtool.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1578420 13f79535-47bb-0310-9956-ffa450edef68
apr_sockaddr_t into a specified pool.

Submitted by: Yann Ylavic <ylavic.dev gmail.com>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1587045 13f79535-47bb-0310-9956-ffa450edef68
process pthread mutexes.

Submitted by: Yann Ylavic <ylavic.dev gmail.com>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1587063 13f79535-47bb-0310-9956-ffa450edef68
Submitted by: Yann Ylavic <ylavic.dev gmail.com>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1587543 13f79535-47bb-0310-9956-ffa450edef68
as described by RFC4514 and RFC4515 respectively.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1588878 13f79535-47bb-0310-9956-ffa450edef68
… filter

escaping, allowing the option to escape both at the same time.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1588937 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1590624 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1590663 13f79535-47bb-0310-9956-ffa450edef68
Enabled by new configure option --enable-pool-concurrency-check.

Compared to pool-owner-debugging, this only detects cases where there is actual
contention between accesses. The advantage is that runtime costs should be
relatively low.

The diagnostic messages could still use some improvement.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1593614 13f79535-47bb-0310-9956-ffa450edef68
Add new --enable-allocator-guard-pages configure option which works like
--enable-allocator-uses-mmap, but will also add inaccessible guard pages before
and after each memnode.  This will result in higher ressource usage but allow
to find/protect against certain buffer overflow/overread bugs.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1593615 13f79535-47bb-0310-9956-ffa450edef68
Ivan Zhakov and others added 21 commits November 19, 2016 08:30
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1770832 13f79535-47bb-0310-9956-ffa450edef68
…e pool

given to crypto_key()/crypto_passphrase().



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1772414 13f79535-47bb-0310-9956-ffa450edef68
Patch by Hanno Böck


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1772803 13f79535-47bb-0310-9956-ffa450edef68
* file_io/win32/filestat.c
  (apr_file_info_get): Use GetFileSizeEx() instead of GetFileInformationByHandleEx()
   when only APR_FINFO_SIZE is requested.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1774712 13f79535-47bb-0310-9956-ffa450edef68
webviewer:projectlanguage properties for TortoiseSVN.

git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1774713 13f79535-47bb-0310-9956-ffa450edef68
* mmap/win32/mmap.c
  (apr_mmap_create): Use CreateFileMappingW() if APR_HAS_UNICODE_FS and   
  IF_WIN_OS_IS_UNICODE.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1774923 13f79535-47bb-0310-9956-ffa450edef68
As noticed by rjung, not all pthread implementations have mutex_timedlock(),
like Solaris 8, so proc_mutex_proc_pthread_timedacquire() can return
APR_ENOTIMPL.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1774973 13f79535-47bb-0310-9956-ffa450edef68
Wrong place for this check, and wrong value too (should be 1 << 17).
But actually the max is already caped by _crypt_gensalt_blowfish_rn()
which is necessarily called previously in apr_bcrypt_encode().



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1774976 13f79535-47bb-0310-9956-ffa450edef68
the second/double proc_ (consistently with other mechanisms).



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1775069 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1776994 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1778149 13f79535-47bb-0310-9956-ffa450edef68
Submitted by: Michal Karm Babacek <karm fedoraproject.org>
Reviewed by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1778153 13f79535-47bb-0310-9956-ffa450edef68

APR_DECLARE(apr_status_t) apr_thread_setname(apr_thread_t *thread, const char *name)
{
return APR_ENOTIMPL;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

@sergey-safarov sergey-safarov Jan 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @jeking3
I not have windows PC and cannot build and test code for Windows platform. Could you create PR to my repo? I will merge your PR into this.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend committing this because technically it isn't wrong - it returns "not implemented", and someone will do then win32 side when they need it. I would implement it such that the documented API would be used, and then if Windows is an earlier version than that API supports, to use the trick found in https://www.codeproject.com/articles/8549/name-your-threads-in-the-vc-debugger-thread-list.

If pull requests here leveraged Travis CI and Appveyor you would be able to make those changes and see the tests pass... it's too bad the project doesn't leverage the free CI tools that exist for open source projects.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeking3, could you mark PR as reviewed.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, although I should ask why folks more closely tied to the project are not reviewing the pull requests? I am a PMC member on Thrift, and I maintain some Boost libraries... I don't look at apr that often.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeking3: activity mostly happens on the dev@apr.apache.org mailing list and bugzilla.
PRs are looked at from time to time, by individuals...

@sergey-safarov: a new function mostly ENOTIMPL (but on some pthread implementations, as _np suffix suggests) is not very attractive for APR (P stands for Portable). Any chance to at least handle Windows per MSDN link? (I can't compile nor test myself unfortunately).
Maybe for your use case apr_os_thread_get() could help to do native calls on the native thread descriptor.

Copy link

@jeking3 jeking3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend adding another story to the backlog to get Win32 thread naming to work per the comments here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.