[Oberon] clock_gettime
Felix Friedrich
felixf at ethz.ch
Wed Jul 15 07:51:57 CEST 2026
Hi Peter
The procedure variables offered by Linux.Unix.Mod should (but possibly
don't) form the minimal set of procedures required to run the system. I
wonder where the system actually traps. Do you have more output after
that Trap 11 line?
Maybe in this case an easy fix is to offer a different Timer module?
Because the kernel does not really seem to use the procedure variables
you referred to (as far as I can see this).
If this fix is not acceptable, what can be done is offering a proper
procedure Unix.clock_gettime and check the availability of the
clock_gettime_x (or whatever it would then be called internally) or call
alternative functions from there.
Kind regards
Felix
On 7/11/26 17:09, peter at easthope.ca wrote:
> Hi,
> =================================
> Starting A2 system.
> Unix.Dlsym: entry 'clock_gettime' not found
> Unix.Dlsym: entry 'clock_getres' not found
> GC mode : metadata
>
> LinuxA2 Gen. 32-bit, Apr 19 2023 2026/07/05 06:04
>
> Trap 11 (Segmentation violation)
> =================================
>
> Clock access in an older Linux differs from contemporary Linux. I
> wonder whether Linux.Unix.Mod can determine what is available before
> invoking something certain to fail. Then invoke something which
> works.
>
> Linux.Unix.Mod has this.
> Dlsym( libc, "clock_gettime", ADDRESSOF(clock_gettime) );
> ...
> clock_gettime- : PROCEDURE {C} (clk_id: INTEGER; tp: ADDRESS): INTEGER;
>
> Ideas?
>
> Thanks, ... P.L.
>
--
Dr. Felix Friedrich, Senior Scientist, Study Coordinator D-INFK
Department of Computer Science
ETH Zurich, CAB H 33.3
Universitätsstr. 6
8092 Zurich, Switzerland
tel.: +41 44 632 8312
More information about the Oberon
mailing list