Hi Anil, Thanks for your response. There are many implementation of messaging in kernel. I am looking for specific implementation of Linux kernel. So, If I am not wrong, from your structures you posted, it seems Linux is implementing using file system. Lets make this an assumption and post it to groups. Please if anyone has idea of messaging implementation, please let us know. Thanks, Sri. On Sun, Jan 23, 2011 at 3:48 PM, anil joshi <anilsjoshi123@xxxxxxxxx> wrote: > I would like to share my knowledge with you Âif any technical error > please suggest me > > As in Process management > > struct thread_info { >     struct task_struct   Â*task;     Â/* main task structure */ >     struct exec_domain   Â*exec_domain;  /* execution domain */ >     __u32          flags;     Â/* low level flags */ >     __u32          status;     /* thread synchronous flags */ >     __u32          cpu;      Â/* current CPU */ >     int           preempt_count; Â/* 0 => preemptable, >                          <0 => BUG */ >     mm_segment_t      Âaddr_limit; >     struct restart_block  Ârestart_block; >     void __user       *sysenter_return; > Â#ifdef CONFIG_X86_32 >     unsigned long      previous_esp;  /* ESP of the previous stack in >                          Âcase of nested (IRQ) stacks >                         */ >     __u8          Âsupervisor_stack[0]; > Â#endif >     int           uaccess_err; > Â}; > > > > > struct task_struct Â{ > > ----- > -- > - > ---- > ----- > } > > > in a similar fashion ÂFile System Management in that VFS > the four Primary object of VFS are > (courtesy Âby Robert ÂLove Linux kernel Dev elopement) > super block object Â-> represent mounted file system (contained in > struct vfsmount) > i node object -> represent a specific Âfile > > d entry object -> represent directory entry, a single component of a path > fiie object -> open file as associated with process > > Layered approach > Object of struct mqueue_inode_info layered Âon Object of struct inode > (vfs_inode) > > or > > Object of struct inode (vfs_inode) Âcontained in struct mqueue_inode_info > > > > it contain particular message specific information like > > $ ls /dev/mqueue/mymq > QSIZE:129   NOTIFY:2  ÂSIGNO:0  ÂNOTIFY_PID:8260 > > > > struct mqueue_inode_info { >    Âspinlock_t lock; >    Âstruct inode vfs_inode; >    Âwait_queue_head_t wait_q; > >    Âstruct msg_msg **messages; >    Âstruct mq_attr attr; > >    Âstruct sigevent notify; >    Âstruct pid* notify_owner; >    Âstruct user_struct *user;    /* user who created, for accounting */ >    Âstruct sock *notify_sock; >    Âstruct sk_buff *notify_cookie; > >    Â/* for tasks waiting for free space and messages, respectively */ >     struct ext_wait_queue e_wait_q[2]; > >     unsigned long qsize; /* size of queue in memory (sum of all msgs) */ > Â}; > > struct inode Â{ > Â---- > ---- > ---- > } > > > we used the generic inode structure as the inode layer does not need > to know about the Â/dev/mqueue/mymq stucture(mqueue_inode_info) > > flush > unlnk > look up > mqueue_poll_file, > mqueue_read_file > are specific to mqueue inode > static const struct inode_operations mqueue_dir_inode_operations = { >    Â.lookup = simple_lookup, >    Â.create = mqueue_create, >    .unlink = mqueue_unlink, > Â}; > > static const struct file_operations mqueue_file_operations = { >    Â.flush = mqueue_flush_file, >    Â.poll = mqueue_poll_file, >    Â.read = mqueue_read_file, > Â}; > > inode->i_fop = &mqueue_file_operations; > inode->i_op = &mqueue_dir_inode_operations; > > > refer http://bec-systems.com/web/content/view/94/9/ > http://www.kroah.com/log/linux/container_of.html > > if u know more regarding mqueue share it > > Regards > Anil.S.Joshi > -- Regards, Sri. -- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs