about summary refs log tree commit diff
path: root/src/thread/pthread_getattr_np.c
Commit message (Collapse)AuthorAgeFilesLines
* in pthread_getattr_np, use mremap rather than madvise to measure stackRich Felker2013-07-311-1/+2
| | | | | | | | | | | the original motivation for this patch was that qemu (and possibly other syscall emulators) nop out madvise, resulting in an infinite loop. however, there is another benefit to this change: madvise may actually undo an explicit madvise the application intended for its stack, whereas the mremap operation is a true nop. the logic here is that mremap must fail if it cannot resize the mapping in-place, and the caller knows that it cannot resize in-place because it knows the next page of virtual memory is already occupied.
* implement pthread_getattr_npRich Felker2013-03-311-0/+21
this function is mainly (purely?) for obtaining stack address information, but we also provide the detach state since it's easy to do anyway.