Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ English | [中文](README_ZH.md)

## 🚀 Features

- [x] Preemptive(`not supported in windows`): even if the coroutine enters a dead loop, it can still be seized,
- [x] Preemptive: even if the coroutine enters a dead loop, it can still be seized,
see [example](https://github.com/loongs-zhang/open-coroutine/blob/master/open-coroutine/examples/preemptive.rs);
- [x] Hook: you are free to use most of the slow syscall in coroutine, see supported syscall
on [unix](https://github.com/acl-dev/open-coroutine/blob/master/hook/src/syscall/unix.rs)/[windows](https://github.com/acl-dev/open-coroutine/blob/master/hook/src/syscall/windows.rs);
Expand Down
2 changes: 1 addition & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

## 🚀 当前特性

- [x] 抢占调度(`不支持windows`):
- [x] 抢占调度:
即使协程进入死循环,它仍能被抢占,查看[例子](https://github.com/loongs-zhang/open-coroutine/blob/master/open-coroutine/examples/preemptive.rs);
- [x] Hook:
您可以在协程中自由使用大多数慢系统调用,查看支持的系统调用[unix](https://github.com/acl-dev/open-coroutine/blob/master/hook/src/syscall/unix.rs)/[windows](https://github.com/acl-dev/open-coroutine/blob/master/hook/src/syscall/windows.rs);
Expand Down
4 changes: 2 additions & 2 deletions core/docs/cn/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ author: loongs-zhang

| | ELF (Linux, BSD, bare metal, etc) | Darwin (macOS, iOS, etc) | Windows |
|---------------|-----------------------------------|--------------------------|---------|
| `x86_64` | ✅ | ✅ | |
| `x86` | ✅ | ❌ | |
| `x86_64` | ✅ | ✅ | |
| `x86` | ✅ | ❌ | |
| `AArch64` | ✅ | ✅ | ❌ |
| `ARM` | ✅ | ❌ | ❌ |
| `RISC-V` | ✅ | ❌ | ❌ |
Expand Down
4 changes: 2 additions & 2 deletions core/docs/en/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ The `preemptive` feature currently supports the following targets:

| | ELF (Linux, BSD, bare metal, etc) | Darwin (macOS, iOS, etc) | Windows |
|---------------|-----------------------------------|--------------------------|---------|
| `x86_64` | ✅ | ✅ | |
| `x86` | ✅ | ❌ | |
| `x86_64` | ✅ | ✅ | |
| `x86` | ✅ | ❌ | |
| `AArch64` | ✅ | ✅ | ❌ |
| `ARM` | ✅ | ❌ | ❌ |
| `RISC-V` | ✅ | ❌ | ❌ |
Expand Down
2 changes: 1 addition & 1 deletion core/src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ std::arch::global_asm!(
// the coroutine is truly CPU-bound with no syscalls — do_preempt
// forces an immediate context switch.
#[cfg(windows)]
std::thread_local! {
thread_local! {
static PREEMPT_PENDING: Cell<bool> = const { Cell::new(false) };
}

Expand Down
Loading