1 <h2>mapped_tvalspec
</h2>
4 <strong>Structure
</strong> - Specifies the format the kernel uses to maintain a mapped clock's time.
7 <strong>struct mapped_tvalspec
</strong>
9 <strong>tvalspec_t
</strong> <var>mtv_time
</var><strong>;
</strong>
10 <strong>unsigned int
</strong> <var>mtv_csec
</var><strong>;
</strong>
13 <strong>typedef struct mapped_tvalspec mapped_tvalspec_t;
</strong>
17 <dt> <var>mtv_time
</var>
21 <dt> <var>mtv_csec
</var>
23 A field used to synchronize with the kernel's setting of the time.
27 The
<strong>mapped_tvalspec
</strong> structure defines the format of the
28 current-time structure
29 maintained by the kernel and visible through a mapped clock
30 (
<strong>clock_map_time
</strong>). The data in this structure is updated at the
31 clock's current resolution and contains the same
<strong>tvalspec
</strong> value that
32 would be returned by
<strong>clock_get_time
</strong>.
35 Because of the race between the referencing of the multiple fields
37 value and the kernel's setting them, they should be referenced as follows:
40 <strong>tvalspec_t* ts;
</strong>
43 <strong>ts-
> tv_sec = mtime -
> mtv_time.tv_sec;
</strong>
44 <strong>ts -
> tv_nsec = mtime -
> mtv_time.tv_nsec;
</strong>
45 <strong>} while (ts -
> tv_sec != mtime -
> mtv_csec);
</strong>
47 <h3>RELATED INFORMATION
</h3>
50 <a href=
"clock_map_time.html"><strong>clock_map_time
</strong></a>,
51 <a href=
"clock_get_time.html"><strong>clock_get_time
</strong></a>.
54 <a href=
"tvalspec.html"><strong>tvalspec
</strong></a>.