[PATCH v3 5/6] Add support for LWP-based threads on FreeBSD.
Pedro Alves
palves@redhat.com
Mon Jan 18 12:37:00 GMT 2016
Eli, this revision includes NEWS/docs bits.
On 01/18/2016 02:27 AM, John Baldwin wrote:
> Older versions of FreeBSD supported userland threading via a pure
> user-space threading library (N threads scheduled on 1 process) and
> a N:M model (N threads scheduled on M LWPs). However, modern FreeBSD
> versions only support a M:M threading model where each user thread is
> backed by a dedicated LWP. This thread target only supports this
> threading model. It also uses ptrace to query and alter LWP state
> directly rather than using libthread_db to simplify the implementation.
>
> FreeBSD recently gained support for reporting LWP events (birth and death
> of LWPs). GDB will use LWP events when present. For older systems it
> fetches the list of LWPs in the to_update_thread_list target op to update
> the list of threads on each stop.
>
> This target supports scheduler locking by using ptrace to suspend
> individual LWPs as necessary before resuming a process.
Code changes LGTM.
Thanks,
Pedro Alves
More information about the Binutils
mailing list