函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events.c Create Date:2022-07-27 13:26:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:subsystem_open

函数原型:static int subsystem_open(struct inode *inode, struct file *filp)

返回类型:int

参数:

类型参数名称
struct inode *inode
struct file *filp
1419  struct event_subsystem * system = NULL
1420  struct trace_subsystem_dir * dir = NULL
1424  如果tracing_is_disabled()则返回:负ENODEV
1428  mutex_lock( & event_mutex)
1429  mutex_lock( & race_types_lock is used to protect the trace_types list.)
1432  如果dir恒等于s or device private pointer
1434  如果nr_events
1436  system等于subsystem
1438  转到:exit_loop
1442  exit_loop :
1443  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1444  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1446  如果非system则返回:负ENODEV
1450  WARN_ON(!dir)
1453  如果trace_array_get(tr)小于0则
1454  put_system(dir)
1455  返回:负ENODEV
1458  ret等于tracing_open_generic(inode, filp)
1459  如果ret小于0则
1460  race_array_put - Decrement the reference counter for this trace array.* NOTE: Use this when we no longer need the trace array returned by* trace_array_get_by_name(). This ensures the trace array can be later* destroyed.
1461  put_system(dir)
1464  返回:ret