On Wed, Jun 9, 2010 at 3:35 AM, Balachandar <[email protected]> wrote:
> Hello,
> I came across the following statements and confused about it.
>
> typedef void vq_callback_t(struct virtqueue *);
This is typedef'ing the function vq_callback_t.
>
>
>
> and in some other file
>
> vq_callback_t *callbacks[] = { skb_recv_done, skb_xmit_done, NULL};
Here callbacks is an array of pointers to vq_callback_t.
>
>
>
> Is this the same as
> typedef void (*vq_callback_t)(struct virtqueue *);
Here you are declaring vq_callback_t itself as a pointer to a function
which returns void and takes a pointer to struct virtqueue as an arg.
So here, if you ignore the same name, callback[0/1/2] is same as the
"vq_callback_t" def here.
CMIIW.
Regards,
-mandeep
>
>
> vq_callback_t callbacks[] = { skb_recv_done, skb_xmit_done, NULL};
>
>
>
> Thanks,
> Bala
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ