lkml.org 
[lkml]   [2009]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] Add function to convert between calendar time andbroken-down time for universal use
Date
* From: "Pavel Machek" <pavel@ucw.cz>
>> > +extern void gmtime(__kernel_time_t totalsecs,
>> > + unsigned int *year, unsigned int *mon, unsigned int *mday,
>> > + unsigned int *hour, unsigned int *min, unsigned int *sec,
>> > + unsigned int *wday, unsigned int *yday);
>> > +extern void localtime(__kernel_time_t totalsecs,
>> > + unsigned int *year, unsigned int *mon, unsigned int *mday,
>> > + unsigned int *hour, unsigned int *min, unsigned int *sec,
>> > + unsigned int *wday, unsigned int *yday);
>
>
> Should year/mon/.../yday be passed up as a structure?

Hello, Pavel

Thanks for your attention.

Actually, I considered to introduce a struct as your think, but finally I
choose to use arguments list instead of a struct, because:
1: User can easy to call this function without define a struct
2: Get rid of adding a additional struct into kernel

In fact, I think both(use a struct or not) should be ok.

Thanks
Zhaolei
\
 
 \ /
  Last update: 2009-07-20 04:59    [W:0.779 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site