Multithreading truss中的上下文系统调用

Multithreading truss中的上下文系统调用,multithreading,solaris,truss,Multithreading,Solaris,Truss,在Solaris 10中进行流程构架时, 我发现了下面的陈述 <pid>/2: 70.7602 context(1, 0xFC47ABF8) /2:70.7602上下文(1,0xFC47ABF8) 请解释此系统调用context的含义 在这次调用之后,我还看到线程2的行为类似于另一个线程4。 <ucontext.h> int getcontext(ucontext_t *ucp); int setcontext(const ucontext_t *ucp);`

在Solaris 10中进行流程构架时, 我发现了下面的陈述

<pid>/2:    70.7602 context(1, 0xFC47ABF8)
/2:70.7602上下文(1,0xFC47ABF8)
请解释此系统调用
context
的含义 在这次调用之后,我还看到线程2的行为类似于另一个线程4。


<ucontext.h>
int getcontext(ucontext_t *ucp);
int setcontext(const ucontext_t *ucp);`
int getcontext(ucontext\u t*ucp); int setcontext(const ucontext\u t*ucp)`
这两个调用在Solaris中保存和恢复上下文。 我并不确定,因为在McDougal和Mauro的“Solaris内部构件”中没有明确提到context()。 我假设
context()
是与这些api入口点对应的实际内核调用。 也许
context(1,)
对应于
getcontext()
,我不知道

上下文切换是操作系统如何允许给定进程为给定的量(时间片)使用系统资源。日程安排的一部分