Documentation ¶
Index ¶
- Constants
- Variables
- func Before_map(target_fn *ssa.Function, all_lockers []*Locker, entry_locks []*Lock_op, ...) map[ssa.Instruction][]*Lock_op
- func CallName(call *ssa.CallCommon) string
- func Find_locker_info_inst(inst ssa.Instruction) (name, locker_type, op_type string, is_defer, is_locker bool)
- func Is_inst_end_of_fn(inst ssa.Instruction) bool
- func Scan_lock_inst_return_value_comment(inst ssa.Instruction) (v ssa.Value, comment string)
- type Lock_op
- type Locker
- type Unlock_op
- type Wrapper
Constants ¶
View Source
const Edited = "Edited"
View Source
const M_Lock = "M_Lock"
View Source
const M_Unlock = "M_Unlock"
View Source
const RW_Lock = "RW_Lock"
View Source
const RW_RLock = "RW_RLock"
View Source
const RW_RUnlock = "RW_RUnlock"
View Source
const RW_Unlock = "RW_Unlock"
View Source
const Unknown = "Unknown"
Variables ¶
View Source
var INIT_LOCK = &Lock_op{
Name: "INIT_LOCK",
}
Functions ¶
func Before_map ¶
func CallName ¶
func CallName(call *ssa.CallCommon) string
func Find_locker_info_inst ¶
func Find_locker_info_inst(inst ssa.Instruction) (name, locker_type, op_type string, is_defer, is_locker bool)
func Is_inst_end_of_fn ¶
func Is_inst_end_of_fn(inst ssa.Instruction) bool
func Scan_lock_inst_return_value_comment ¶
func Scan_lock_inst_return_value_comment(inst ssa.Instruction) (v ssa.Value, comment string)
Types ¶
type Locker ¶
type Locker struct { Name string Type string Locks []*Lock_op Unlocks []*Unlock_op Pkg string // Don't use *ssa.Package here! It's not reliable Status string }
func Scan_inst_and_record_to_slice ¶
func Scan_inst_and_record_to_slice(lockers []*Locker, inst ssa.Instruction) (result []*Locker, is_locker_op bool)
func (*Locker) Modify_status ¶
type Wrapper ¶
type Wrapper struct { Fn *ssa.Function // When compare two Wrapper, can't directly compare Fn or inst, because pointer will change during each compilation Fn_str string Inst ssa.Instruction Callee *Wrapper // if callee is nil, then inst is the Lock_op itself, else inst is calling to another Wrapper Op *Lock_op // the wrapped operation }
Wrapper records a function that "contains" a Lock_op. "Contains" means the function directly uses this Lock_op, or its callee (or callee's callee) uses this Lock_op. The maximum layer is C6A_call_chain_layer_for_lock_wrapper
Click to show internal directories.
Click to hide internal directories.