Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: timers related

0 views
Skip to first unread message

Martin Husemann

unread,
May 29, 2016, 5:29:40 AM5/29/16
to
On Sat, May 28, 2016 at 11:28:00PM -0700, Charles Cui wrote:
> HI guys,
>
> I have 3 timers related macro to be added, which are _SC_CPUTIME,
> _SC_THREAD_CPUTIME and _SC_DELAYTIMER_MAX.

If I read the standard correctly, all of those are optional.

So first we need to decide, whether to add them at all. Christos, do I
remember correctly you said the first two would be simple?

Charles: isn't _SC_DELAYTIMER_MAX being undefined the way to express there
is no hard limit?

Which errors are you running into exactly? It seems to me you are trying to
fix bugs in the test suite by adapting NetBSD in this case (but I might be
missing something).

Martin

Christos Zoulas

unread,
May 29, 2016, 9:46:32 AM5/29/16
to
On May 28, 11:28pm, charles...@gmail.com (Charles Cui) wrote:
-- Subject: timers related

| HI guys,
|
| I have 3 timers related macro to be added, which are _SC_CPUTIME,
| _SC_THREAD_CPUTIME and _SC_DELAYTIMER_MAX.
| the first and second are set to be 200112L in freebsd. I am wondering
| what's the meaning of those macros? and what are the cases to use these
| macros? I am thinking of where to add logics related with these macros. By
| the way, freebsd source cannot be browsed on nxr any more?

_SC_CPUTIME is for clock_getcpuclockid()
https://sourceforge.net/p/posixtest/mailman/message/3663935/
_SC_THREAD_CPUTIME is for pthread_getclockcpuid()
_SC_DELAYTIMER_MAX is for timer_getoverrun()
https://docs.oracle.com/cd/E19683-01/816-0213/6m6ne38dd/index.html
http://man7.org/linux/man-pages/man2/timer_getoverrun.2.html

I just used google to find them...

christos

Christos Zoulas

unread,
May 29, 2016, 9:49:47 AM5/29/16
to
On May 29, 11:29am, mar...@duskware.de (Martin Husemann) wrote:
-- Subject: Re: timers related

| On Sat, May 28, 2016 at 11:28:00PM -0700, Charles Cui wrote:
| > HI guys,
| >
| > I have 3 timers related macro to be added, which are _SC_CPUTIME,
| > _SC_THREAD_CPUTIME and _SC_DELAYTIMER_MAX.
|
| If I read the standard correctly, all of those are optional.
|
| So first we need to decide, whether to add them at all. Christos, do I
| remember correctly you said the first two would be simple?

I implemented those already in head, but I don't recall adding the sysconf
and the _POSIX_ equivalent variables.

| Charles: isn't _SC_DELAYTIMER_MAX being undefined the way to express there
| is no hard limit?
|
| Which errors are you running into exactly? It seems to me you are trying to
| fix bugs in the test suite by adapting NetBSD in this case (but I might be
| missing something).

christos

Charles Cui

unread,
May 30, 2016, 12:26:10 AM5/30/16
to
Thanks for these information!
I will implement these missing features asap.

2016-05-29 6:46 GMT-07:00 Christos Zoulas <chri...@zoulas.com>:

> On May 28, 11:28pm, charles...@gmail.com (Charles Cui) wrote:
> -- Subject: timers related
>
> | HI guys,
> |
> | I have 3 timers related macro to be added, which are _SC_CPUTIME,
> | _SC_THREAD_CPUTIME and _SC_DELAYTIMER_MAX.

Charles Cui

unread,
Jun 3, 2016, 6:30:36 PM6/3/16
to
HI guys,

I have 3 timers related macro to be added, which are _SC_CPUTIME,
_SC_THREAD_CPUTIME and _SC_DELAYTIMER_MAX.
the first and second are set to be 200112L in freebsd. I am wondering
what's the meaning of those macros? and what are the cases to use these
macros? I am thinking of where to add logics related with these macros. By
the way, freebsd source cannot be browsed on nxr any more?





Thanks, Charles.

Zafer Aydoğan

unread,
Jun 3, 2016, 7:20:27 PM6/3/16
to
You can find the FreeBSD sources at:

http://src.illumos.org/source/
or
https://grok.dragonflybsd.org/
or
http://bxr.su/

2016-05-30 4:28 GMT+02:00 Charles Cui <charles...@gmail.com>:
> Thanks for these information!
> I will implement these missing features asap.
>
> 2016-05-29 6:46 GMT-07:00 Christos Zoulas <chri...@zoulas.com>:
>
>> On May 28, 11:28pm, charles...@gmail.com (Charles Cui) wrote:
>> -- Subject: timers related
>>

Christos Zoulas

unread,
Jun 3, 2016, 7:59:42 PM6/3/16
to
On Jun 3, 4:37pm, charles...@gmail.com (Charles Cui) wrote:
-- Subject: Re: timers related

| Thanks Zafer for letting me know.
| The missing features in timer part has been implemented. And I have
| attached my patch.
| Please review this patch.

Hi Charles,

As you can see I have started committing your patches to the NetBSD source
tree. I've already committed the bsd_signal patch. Can you please amend
the signal.3 man page to document it?

Thanks,

christos

Christos Zoulas

unread,
Jun 3, 2016, 8:05:15 PM6/3/16
to
On Jun 3, 5:01pm, charles...@gmail.com (Charles Cui) wrote:
-- Subject: Re: timers related

| Yes, sure. I will finish it as soon as possible.
| And will let you know if I encounter new problems.

Yes, and for all the other patches... For example adding _SC_SEM_NSEMS_MAX
should also be documented, etc; see:

$ man -k _SC_PHYS_PAGES
sysconf (3) get configurable system variables
...3) and getpwuid_r(3) . _SC_NPROCESSORS_CONF The number of processors configured. _SC_NPROCESSORS_ONLN The number of processors online (capable of running processes). _SC_PHYS_PAGES The amount of physical memory on the system in _SC_PAGESIZE bytes. _SC_TIMER_MAX The number of timers available for timer_create...

I will hold on committing the rest until you add the documentation, since
it would be good to have the docs in the same commit as the addition.

Thanks!

christos

Charles Cui

unread,
Jun 3, 2016, 10:39:43 PM6/3/16
to
Yes, sure. I will finish it as soon as possible.
And will let you know if I encounter new problems.


Thanks, Charles

2016-06-03 16:59 GMT-07:00 Christos Zoulas <chri...@zoulas.com>:

> On Jun 3, 4:37pm, charles...@gmail.com (Charles Cui) wrote:
> -- Subject: Re: timers related
>

Christos Zoulas

unread,
Jun 5, 2016, 1:18:59 PM6/5/16
to
On Jun 5, 9:53am, charles...@gmail.com (Charles Cui) wrote:
-- Subject: Re: timers related

| Hi Christos,
|
| I have completed the man pages for bsd_signal, _SC_SEM_NSEMS_MAX and
| timer related. Let me know if you want man pages for other pages. I have
| attached the patches your convenience, but you can find all from
| https://github.com/ycui1984/posixtestsuite

Thanks, I've started committing them. Please take a look at the commits
to see what I've changed/added so I have to do even less work next time :-)

christos

Christos Zoulas

unread,
Jun 5, 2016, 5:00:30 PM6/5/16
to
On Jun 5, 1:14pm, charles...@gmail.com (Charles Cui) wrote:
-- Subject: Re: timers related

| Hi Christos,
|
| One quick question about this commit.
| https://github.com/IIJ-NetBSD/netbsd-src/commit/ef38d5736b7367bff9aba260f532e5b24728b224
|
| why do we need this line twice?
| +./usr/share/man/cat3/bsd_signal.0 comp-c-catman .cat

Because I pasted it twice accidentally, and I have fixed it since :-)

christos

Charles Cui

unread,
Jun 5, 2016, 7:18:47 PM6/5/16
to
Sure, I will keep an eye on them.


Thanks, Charles.

2016-06-05 10:18 GMT-07:00 Christos Zoulas <chri...@zoulas.com>:

> On Jun 5, 9:53am, charles...@gmail.com (Charles Cui) wrote:
> -- Subject: Re: timers related
>
> | Hi Christos,
> |

Charles Cui

unread,
Jun 5, 2016, 7:49:13 PM6/5/16
to
Hi Christos,

One quick question about this commit.
https://github.com/IIJ-NetBSD/netbsd-src/commit/ef38d5736b7367bff9aba260f532e5b24728b224

why do we need this line twice?
+./usr/share/man/cat3/bsd_signal.0 comp-c-catman .cat

Charles Cui

unread,
Jun 5, 2016, 7:49:21 PM6/5/16
to
Thanks!

2016-06-05 14:00 GMT-07:00 Christos Zoulas <chri...@zoulas.com>:

> On Jun 5, 1:14pm, charles...@gmail.com (Charles Cui) wrote:
> -- Subject: Re: timers related
>
> | Hi Christos,
> |
> | One quick question about this commit.
> |
> https://github.com/IIJ-NetBSD/netbsd-src/commit/ef38d5736b7367bff9aba260f532e5b24728b224
> |
> | why do we need this line twice?
> | +./usr/share/man/cat3/bsd_signal.0 comp-c-catman .cat
>
0 new messages