Re: Using of struct tm in kernel module

Peter Skvarka <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
The more I work with this operating system, the more I like it.
I understand that development of OS keeps some rules and some philosophy.
And I fully understand that kernel should not care for such thing like 
Monday, Sunday, 29-Feb, 31-Jan, 30-Apr, etc.

Consider please,
Windows is able to work with equivalent of struct tm in kernel and 
contains conversion functions and Linux too.
I accept that this feature is not present in NetBSD (and I am almost 
finished with implementing it just this time).

Not easy to explain details of the overall data flow, important for 
porting to NetBSD is to minimize differences,
Problems to abstract some different os features comes when principles 
are significantly different.

Peter

On 3/3/25 10:26, Martin Husemann wrote:
> On Mon, Mar 03, 2025 at 10:17:21AM +0100, Peter Skvarka wrote:
>>> representation for anything the kernel deals with?
>> For example for scheduling some event to first day of week or monthday and
>> this scheduling must be calculated in kernel module. I am porting functional
>> code to NetBSD.
> It is hard to believe that this *must* happen inside the kernel module.
> Can you explain more details of the overall data flow? Why would the kernel
> care for something like a week?
>
> The kernel can schedule an event at arbitrary times in the future, and
> those can be represented as timespec, timeval or even plain seconds.
> Deciding on the next event usually depends on configuration and other
> userland stuff, so the time conversion is done in userland.
>
> Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.