mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-03 23:20:25 +08:00
bfs:对FileHeader的压缩和解压使用Pool管理
This commit is contained in:
19
internal/utils/percpu/proc_id.go
Normal file
19
internal/utils/percpu/proc_id.go
Normal file
@@ -0,0 +1,19 @@
|
||||
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package percpu
|
||||
|
||||
import (
|
||||
_ "unsafe"
|
||||
)
|
||||
|
||||
//go:linkname runtime_procPin runtime.procPin
|
||||
func runtime_procPin() int
|
||||
|
||||
//go:linkname runtime_procUnpin runtime.procUnpin
|
||||
func runtime_procUnpin() int
|
||||
|
||||
func GetProcId() int {
|
||||
var pid = runtime_procPin()
|
||||
runtime_procUnpin()
|
||||
return pid
|
||||
}
|
||||
Reference in New Issue
Block a user