cpu: change _cpu()->thread calls to current_thread() to fix smp race

This commit is contained in:
Matheus
2024-09-15 17:47:26 -03:00
parent d1c0f2a5fd
commit e058d62261
65 changed files with 196 additions and 190 deletions
+2 -2
View File
@@ -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;
}