switch(chain->state) { caseRESP_STATUS_IDLE: { if(cur_node) { uint16_t retry = cur_node->init_retry; if(cur_node->handle) { cur_node->param_type = RESP_PARAM_INPUT; chain->state = cur_node->handle((resp_chain_node_t*)cur_node ,cur_node->param); } else { RESP_LOG("node...
stat结构体 stat结构体原型在<sys/stat.h>中。因为有各种特殊数据类型,所以需<sys/types.h>头文件。struct stat { dev_t st_dev; /* ID of device containing file -文件所在设备的ID*/ ino_t st_ino; /* inode number -inode节点号*/ mode_t st_mode; /* protection -保护模式?*/ nlink_t st_...
* @phydev: Physical device may attach itself * for hardware timestamping * @sfp_bus: attached &struct sfp_bus structure. * * @qdisc_tx_busylock: lockdep class annotating Qdisc->busylock spinlock * * @proto_down: protocol port state information can be sent to the * switch driver and us...
int stat( const char *filename //⽂件或者⽂件夹的路径 , struct stat *buf //获取的信息保存在内存中 ); //! prototype,原型 正确——返回0 错误——返回-1,具体错误码保存在errno中 struct stat { dev_t st_dev; /* ID of device containing file -⽂件所在设备的ID*...
dev : 原网络设备 type: 网络层的协议类型 daddr:目的MAC地址 saddr:源MAC地址 len :一般可为0 1inteth_header(structsk_buff *skb,structnet_device *dev, u16 type,void*daddr,void*saddr,intlen)2{3//将skb->data = skb->data + ETH_ALEN;4structethhdr *eth = (structethhdr*)skb_push(skb,...
switch(verdict & NF_VERDICT_MASK) { caseNF_ACCEPT: // 如果钩子返回接受,则继续下一个钩子 break; caseNF_DROP: // 如果钩子返回丢弃 kfree_skb_reason(skb, SKB_DROP_REASON_NETFILTER_DROP); ret = NF_DROP_GETERR(verdict); if(ret ==0) ...
unsigned long last_switch_count; #endif 信号处理 /* signal handlers */ struct signal_struct *signal; struct sighand_struct *sighand; 1583 sigset_t blocked, real_blocked; sigset_t saved_sigmask; /* restored if set_restore_sigmask() was used */ ...
fd == devid) break; if(place>=50) printf(" NO DEVICE fd = %d\n ",devid); switch(dev_tab [place]._fd) { case 80: ret = Dev_drv3(int arg1,int arg2); break; case 99: ret = Dev_drv2(int arg1,int arg2); break; case 101: ret = Dev_drv1(int arg1,int arg2); break...
long *switch_count; struct rq *rq; /* * Test if we are atomic. Since do_exit() needs to call into * schedule() atomically, we ignore that path for now. * Otherwise, whine if we are scheduling when we should not be. */
unsigned long nvcsw, nivcsw; /* context switch counts */ struct timespec start_time; /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ unsigned long min_flt, maj_flt; cputime_t it_prof_expires, it_virt_expires; ...