Linux内核中任务上下文与进程上下文的区别

Linux内核中任务上下文与进程上下文的区别

我正在阅读Linux内核文档,发现在某些地方,他们使用任务上下文和进程上下文。

linux/Documentation$ grep -R "task context" .
./driver-model/driver.txt:147:The probe() entry is called in task context, with the     bus's rwsem locked
./DocBook/device-drivers.tmpl:429:  this writing all such functions are usable only from task context.
./gpio.txt:141:a task context.  However, for spinlock-safe GPIOs it's OK to use them
./gpio.txt:258:a task context.  However, for spinlock-safe GPIOs it's OK to request GPIOs
./PCI/pci-error-recovery.txt:134:shouldn't do any new IOs. Called in task context. This is sort of a

linux/Documentation$ grep -R "process context" .
./spinlocks.txt:110:manipulated from a "process context", ie no interrupts involved. 
./dma-buf-sharing.txt:286:   atomic dma_buf kmaps at the same time (in any given process context).
./DocBook/kernel-locking.tmpl:508:          If you are in a process context (any syscall) and want to
./DocBook/lsm.tmpl:152:have no process context (e.g. network input operations).

我理解进程上下文和中断上下文之间的区别,但据我所知,Linux 中的进程和任务并没有太大区别(我想我显然是错的)。有人能告诉我吗?

答案1

在 Linux 内核代码上下文中,它们是同义词。

相关内容