where is FreeBSD's corresponding data structure for Linux's "struct timer_list ?"

Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

where is FreeBSD's corresponding data structure for Linux's "struct timer_list ?"

Postby liuwang » 21 Nov 2011, 18:46

Where is FreeBSD's corresponding data structure for Linux's [FILE]struct timer_list[/FILE]?
liuwang
Junior Member
 
Posts: 31
Joined: 19 Aug 2011, 19:10

Is "ktimer" the one for Linux "struct timer_list ?"

Postby liuwang » 21 Nov 2011, 19:23

Is "ktimer" the one ?


Code: Select all
struct ktimer {
   nt_dispatch_header   k_header;
   uint64_t      k_duetime;
   union {
      list_entry      k_timerlistentry;
      struct callout      *k_callout;
   } u;
   void         *k_dpc;
   uint32_t      k_period;
};
liuwang
Junior Member
 
Posts: 31
Joined: 19 Aug 2011, 19:10

Postby richardpl » 21 Nov 2011, 20:15

Obviously not, ktimer is Windows crap.

And FreeBSD do not need to have corresponding data structure with Linux at all.
Project: github.com/richardpl/NDISulator
richardpl
Member
 
Posts: 841
Joined: 17 Nov 2008, 17:02
Location: Croatia

Postby vertexSymphony » 21 Nov 2011, 22:16

richardpl wrote:Obviously not, ktimer is Windows crap.

And FreeBSD do not need to have corresponding data structure with Linux at all.


There was no need to be aggressive like that =/
Maybe not the same structure, but he refers to *where* you can get the same functionality/information in FreeBSD.
User avatar
vertexSymphony
Junior Member
 
Posts: 78
Joined: 23 May 2010, 22:12
Location: Buenos Aires, Argentina

Postby liuwang » 22 Nov 2011, 04:25

Thanks your reply anyway.

What and where is the FreeBSD's mechanism for timeout timer?

Sincerely,
Liu
liuwang
Junior Member
 
Posts: 31
Joined: 19 Aug 2011, 19:10

Postby SirDice » 22 Nov 2011, 08:05

Not sure if it fits the bill but there's [man=2]timer_create[/man] and [pman=3]evtimer_add[/pman] (from [port]devel/libevent[/port]).
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16196
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby richardpl » 22 Nov 2011, 19:12

That is for userland, just to be sure.
Project: github.com/richardpl/NDISulator
richardpl
Member
 
Posts: 841
Joined: 17 Nov 2008, 17:02
Location: Croatia

Postby liuwang » 22 Nov 2011, 19:14

SirDice,

Thanks.
Retrieved down to [FILE]timeet.h[/FILE] from your hint.

Sincerely,
Liu
liuwang
Junior Member
 
Posts: 31
Joined: 19 Aug 2011, 19:10


Return to FreeBSD Development

Who is online

Users browsing this forum: No registered users and 0 guests