Commit abcf9d3
committed
Fix blake3 on macOS/arm64
BLAKE3_CTX *ctx = blake3_per_cpu_ctx[CPU_SEQID_UNSTABLE];
We have macOS arm64 to call kmem_alloc() as the cpu_number()
changes quite frequently, and would reuse an already active
ctx.
If in future we want to avoid kmem_alloc, we can use the
blake3_per_cpu_ctx[CPU_SEQID_UNSTABLE] but check if it is
busy, and move to the next free slot. Easily implemented with
CAS.
Signed-off-by: Jorgen Lundman <[email protected]>1 parent 802749c commit abcf9d3
2 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
| 367 | + | |
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
0 commit comments