unsigned int policy;int nr_cpus_allowed;constcpumask_t*cpus_ptr;cpumask_t cpus_mask;#ifdefCONFIG_PREEMPT_RCUint rcu_read_lock_nesting;union rcu_special rcu_read_unlock_special;struct list_head rcu_node_entry;struct rcu_node*rcu_blocked_node;#endif/* #ifdef CONFIG_PREEMPT_RCU */#ifdefCONFI...
atomic_t fs_excl; /* holding fs exclusive resources */ struct rcu_head rcu; /* * cache last used pipe for splice */ struct pipe_inode_info *splice_pipe; #ifdef CONFIG_TASK_DELAY_ACCT struct task_delay_info *delays; #endif #ifdef CONFIG_FAULT_INJECTION int make_it_fail; #endif }; ...
cpus_allowed cpus_allowed是一个位域,在多处理器系统上使用,用于控制进程可以在哪里处理器上运行 */ cpumask_t cpus_allowed; /* 14. RCU同步原语 */ #ifdef CONFIG_TREE_PREEMPT_RCU int rcu_read_lock_nesting; char rcu_read_unlock_special; struct rcu_node *rcu_blocked_node; struct list_head rcu...
1306 int rcu_read_lock_nesting; 1307 char rcu_read_unlock_special; 1308 struct list_head rcu_node_entry; 1309 #endif /* #ifdef CONFIG_PREEMPT_RCU */ 1310 #ifdef CONFIG_TREE_PREEMPT_RCU 1311 struct rcu_node *rcu_blocked_node; 1312 #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ 1313 #...
struct rcu_head fu_rcuhead; } f_u; struct path f_path; #define f_dentry f_path.dentry //该成员是对应的 目录结构 。 #define f_vfsmnt f_path.mnt const struct file_operations *f_op; //该操作 是定义文件关联的操作的。内核在执行open时对这个 指针赋值。
struct task_struct __rcu *real_parent; /* real parent process */ struct task_struct __rcu *parent; /* recipient of SIGCHLD, wait4() reports */ /* * children/sibling forms the list of my natural children */ struct list_head children; /* list of my children */ ...
fget(fd)//file.c 传参 refs=1__fget//file.c__fget_files_rcu//file.cget_file_rcu_many(x, cnt)//fs.hatomic_long_add_unless(&(x)->f_count, (cnt),0)//if(f->f_count != 0) f->f_count++; 通常用法 file = fget(fd); 使用完后 fput(file);...
struct rcu_head { struct rcu_head *next; void (*func)(struct rcu_head *head); }; RCU(Read-Copy Update)是Linux 2.6内核中新的锁机制,具体在这里有介绍: http://www.ibm.com/developerworks/cn/linux/l-rcu/ 二、 struct path f_path; ...
structtcp_md5sig_info__rcu*md5sig_info; #endif structtcp_fastopen_request*fastopen_req; structrequest_sock*fastopen_rsk; u32 *saved_syn; }; 下面看一个特别重要的框架,也可以称为是拥塞控制引擎,如下结构体所示,tcp_congestion_ops描述了一套拥塞控制算法所需要支持的操作。这个框架定义了一些钩子函数...
struct task_struct __rcu *real_parent; /* real parent process */ struct task_struct __rcu *parent; /* recipient of SIGCHLD, wait4() reports */ /* * children/sibling forms the list of my natural children */ struct list_head children; /* list of my children */ ...