How nuttx handle sockets with task

2020-09-21 Thread Deepak Sharma
Hi,

i want to know how nuttx handle sockets with task and how task socket
binding is done?
as i went through the code then found that each task has TCB and each TCB
joins a task group. task group structure contains socketlist and when
task_create() called it calls thread_create()-> group_setuptaskfiles()->
net_initlist() which Initialize a list of sockets for a new task(as per
description). so questions are:
1- where is task socket binding is done? (suggest me function name)
2- net_initlist() - it Initialize the list access mutex so as per
description where it initialized the sockets?

clearing question 1st more:
like net_releaselist() - called from group_leave(), so when any task or
thread exits then first it has to release its all resources so in
net_releaselist(), you are first closing the each open socket then
releasing the resources so i want to know where these open sockets was
binded?
i know about socket binding but wants to know about task socket binding.

please explain it and if possible then give function flow or tell me from
which function should i read?

Many Thanks in advance.


Best Regards
Deepak sharma


Task socket Binding

2020-09-26 Thread Deepak Sharma
Hi,

i am new to nuttx. so when i was going through the code then could not
understand how task is binded to sockets. like in linux, sockets are
created with socket_create() which calls sock_alloc() and then it creates
an inode under sockfs and retrieves the socket tied to the inode. so with
this way sockets are binded to task in linux kernel.

here like above i want to know how task is binded to task?
and i want to subscribe to this mailing list. please add me in the same.

Best regards
Deepak sharma