summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-08-07 08:03:05 +0000
committermarcel <marcel@FreeBSD.org>2003-08-07 08:03:05 +0000
commit0dae1482723408fa760bf4b8cf973955a4b195a1 (patch)
treec94f88a3937bcdb6fa6a1e39de2d73a704df6905 /lib/libc
parentb88da9d9aa359a2c9b535d0d5ba6cafdd00efcbe (diff)
downloadFreeBSD-src-0dae1482723408fa760bf4b8cf973955a4b195a1.zip
FreeBSD-src-0dae1482723408fa760bf4b8cf973955a4b195a1.tar.gz
Grok async contexts. When a thread is interrupted and an upcall
happens, the context of the interrupted thread is exported to userland. Unlike most contexts, it will be an async context and we cannot easily use our existing functions to set such a context. To avoid a lot of complexity that may possibly interfere with the common case, we simply let the kernel deal with it. However, we don't use the EPC based syscall path to invoke setcontext(2). No, we use the break-based syscall path. That way the trapframe will be compatible with the context we're trying to restore and we save the kernel a lot of trouble. The kind of trouble we did not want to go though ourselves... However, we also need to set the threads mailbox and there's no syscall to help us out. To avoid creating a new syscall, we use the context itself to pass the information to the kernel so that the kernel can update the mailbox. This involves setting a flag (_MC_FLAGS_KSE_SET_MBOX) and setting ifa (the address) and isr (the value).
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud