Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events.c Create Date:2022-07-28 12:19:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:subsystem_open

Proto:static int subsystem_open(struct inode *inode, struct file *filp)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct file *filp
1419  struct event_subsystem * system = NULL
1420  struct trace_subsystem_dir * dir = NULL
1424  If tracing_is_disabled() Then Return -ENODEV
1428  mutex_lock( & event_mutex)
1429  mutex_lock( & race_types_lock is used to protect the trace_types list.)
1432  If dir == s or device private pointer Then
1434  If nr_events Then
1436  system = subsystem
1438  Go to 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  If Not system Then Return -ENODEV
1450  WARN_ON(!dir)
1453  If trace_array_get(tr) < 0 Then
1454  put_system(dir)
1455  Return -ENODEV
1458  ret = tracing_open_generic(inode, filp)
1459  If ret < 0 Then
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  Return ret