Re: Kernel timers problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

vaishali paisal wrote:

so each time a connection is added hci_conn_add is called and a new timer would be initialised through hci_conn_init_timer.

Here is the interesting part of hci_conn_add() :

struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
{
        struct hci_conn *conn;

        BT_DBG("%s dst %s", hdev->name, batostr(dst));

        if (!(conn = kmalloc(sizeof(struct hci_conn), GFP_ATOMIC)))
                return NULL;
        memset(conn, 0, sizeof(struct hci_conn));

       [...]

        hci_conn_init_timer(conn);

       [...]
}

Conclusion: a new "hci_conn" structure is allocated (using kmalloc) everytime this function is called. And there is one "struct timer_list" in each "hci_conn" structure.

Others: If I say something wrong, don't hesitate to tell me.

Thomas
--
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux