Fix (modified) audiod.

This commit is contained in:
4lDO2
2024-07-17 16:04:17 +02:00
parent d00ec085e1
commit 15cdc4e0aa
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -212,7 +212,7 @@ asmfunction!(__relibc_internal_sigentry: ["
lock btr [rcx + {pctl_off_pending}], eax
jnc 1b
2:
mov eax, edx
mov edx, eax
shr edx, 5
lock btr fs:[{tcb_sc_off} + {sc_word} + edx * 4], eax
add eax, 64 // indicate signal was targeted at thread
+2 -1
View File
@@ -42,7 +42,8 @@ pub struct SigStack {
unsafe fn inner(stack: &mut SigStack) {
let os = &Tcb::current().unwrap().os_specific;
let sig_idx = stack.sig_num;
let _targeted_thread_not_process = stack.sig_num >= 64;
stack.sig_num %= 64;
// asm counts from 0
stack.sig_num += 1;
+2 -3
View File
@@ -802,9 +802,8 @@ impl Pal for Sys {
os_tid: crate::pthread::OsTid,
signal: usize,
) -> Result<(), crate::pthread::Errno> {
todo!();
/*syscall::kill(os_tid.context_id, signal)
.map_err(|error| crate::pthread::Errno(error.errno))?;*/
let killfd = FdGuard::new(syscall::dup(os_tid.thread_fd, b"signal")?);
syscall::write(*killfd, &(signal as u32).to_ne_bytes())?;
Ok(())
}
fn current_os_tid() -> crate::pthread::OsTid {