默默的一块石头
发布时间:2022-02-22 14:36:47
accept睡眠int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, int __user *upeer_addrlen, int flags){ err = sock->ops->accept(sock, newsock, sock->file->f_flags, false);}int inet_accept(struct socket *sock, struct socket *newsock, int flags, bool kern){ struct sock *sk2.........【阅读全文】
发布时间:2022-02-16 11:45:46
1.插入struct proto tcp_prot = { .name = "TCP", .owner = THIS_MODULE, .hash = inet_hash,}Feb 16 10:26:36 chro kernel: [ 14.108487] __inet_hash+0x7d/0x2f0Feb 16 10:26:36 chro kernel: [ 14.108488] inet_hash+0x28/0x50Feb 16 10:26:36 chro kernel: [ .........【阅读全文】
发布时间:2022-01-26 10:07:46
1.test.c#include linux/module.h#include linux/init.h#include linux/export.hstatic DECLARE_WAIT_QUEUE_HEAD(test_wait);static wait_queue_head_t * get_wait_queue(void){ return &test_wait;}EXPORT_SYMBOL(get_wait_queue);static int flag = 0;static int getflag(void){ return flag;}.........【阅读全文】
发布时间:2022-01-24 17:04:20
void add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry){ unsigned long flags; wq_entry->flags |= WQ_FLAG_EXCLUSIVE; spin_lock_irqsave(&wq_head->lock, flags); __add_wait_queue_entry_tail(wq_head, wq_entry); spin_unlock_irqrestore(&wq_head->lock, flags).........【阅读全文】