mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-31 06:28:22 +00:00
cpu: change _cpu()->thread calls to current_thread() to fix smp race
This commit is contained in:
@@ -183,8 +183,8 @@ int pipefs_read(vnode_t *node, void *buffer, size_t size, uintmax_t offset, int
|
||||
|
||||
static int writetopipe(pipenode_t *pipenode, void *buffer, size_t size, size_t *writec) {
|
||||
if (pipenode->readers == 0) {
|
||||
if (_cpu()->thread->proc)
|
||||
signal_signalproc(_cpu()->thread->proc, SIGPIPE);
|
||||
if (current_thread()->proc)
|
||||
signal_signalproc(current_thread()->proc, SIGPIPE);
|
||||
|
||||
return EPIPE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user