본문 바로가기

LIST

linux kernel - list 사용하기 1. struct list_head 를 갖는 struct 를 하나 선언한다.struct A_data {enum A_command cmd;u8 offset;u8 data;struct completion complete;bool use_completion;int *ret;struct list_head list;}; 2. list 를 선언한다. /* global value */LIST_HEAD(&A_data_list); or struct temp_struct {struct list_head B_data_list;} 3. data 를 저장한 struct 를 list 에 넣는다.struct A_data *A_cmd; A_cmd = kzalloc(sizeof(struct A_data), GFP_KERNEL);if .. 더보기
kernel list 항목 삭제 항목을 삭제할때 얻는 item(객체) 은 list_for_each_entry 가 아닌 list_for_each_entry_safe 로 얻은 item 이어야 한다. *자세한 설명은 kernel document 참고 ex) #include struct packet { u8data_1; u8data_2; struct list_head p_packet_list; }; LIST_HEAD(g_packet_list); void func() { struct packet* p_pkt, *scratch; ... list_for_each_entry_safe(p_pkt, scratch, &g_packet_list, p_packet_list) { list_del(&p_pkt->p_packet_list); kfree(p_pkt).. 더보기
linux kernel 2.6.32 - 2.6.35 change list Linux 2 6 33 Linux 2.6.33 has been released on February 24th, 2010. Summary: This version features Nouveau (a reverse-engineered driver for Nvidia graphic cards), Nintendo Wii and Gamecube support, DRBD (Distributed Replicated Block Device), a security extension for TCP called "cookie transactions", a syscall for batching recvmsg() calls, several new perf subcommands (perf probe, perf bench, per.. 더보기
linux kernel 2.6.30, 31, 32 change list Linux 2 6 30 Linux 2.6.30 was released on the 9th of June, 2009. Summary: This version adds the log-structured NILFS2 filesystem, a filesystem for object-based storage devices, a caching layer for local caching of NFS data, the RDS protocol which delivers high-performance reliable connections between the servers of a cluster, a distributed networking filesystem (POHMELFS), automatic flushing of .. 더보기
linux mailing list 정리 linux 를 하면 할 수록 깊이있는 정보는 구글에서도 얻기가 힘들어 지고, 결국 mailing list 를 이용할 수 밖에 없더군요 근식이 형에게 메일링 리스트를 문의했더니 유용한 리스트들을 작업해 둔 페이지를 보내주었습니다. http://invain.homeip.net/maintainer.php 앞으로 도움이 많이 될것 같네요. 필요하신분들 참고하시기 바랍니다. 더보기