mapped_tvalspec.html   [plain text]

<strong>Structure</strong> - Specifies the format the kernel uses to maintain a mapped clock's time.
<strong>struct mapped_tvalspec</strong>
       <strong>tvalspec_t</strong>          <var>mtv_time</var><strong>;</strong>
       <strong>unsigned int</strong>        <var>mtv_csec</var><strong>;</strong>

<strong>typedef struct mapped_tvalspec mapped_tvalspec_t;</strong>
<dt> <var>mtv_time</var>
Clock time.
<dt> <var>mtv_csec</var>
A field used to synchronize with the kernel's setting of the time.
The <strong>mapped_tvalspec</strong> structure defines the format of the 
current-time structure 
maintained by the kernel and visible through a mapped clock 
(<strong>clock_map_time</strong>).  The data in this structure is updated at the 
clock's current resolution and contains the same <strong>tvalspec</strong> value that 
would be returned by <strong>clock_get_time</strong>.
Because of the race between the referencing of the multiple fields
in the clock 
value and the kernel's setting them, they should be referenced as follows:
   <strong>tvalspec_t* ts;</strong>
              <strong>ts-> tv_sec = mtime -> mtv_time.tv_sec;</strong>
              <strong>ts  -> tv_nsec = mtime -> mtv_time.tv_nsec;</strong>
   <strong>} while (ts  -> tv_sec != mtime -> mtv_csec);</strong>
<a href="clock_map_time.html"><strong>clock_map_time</strong></a>,
<a href="clock_get_time.html"><strong>clock_get_time</strong></a>.
Data Structures:
<a href="tvalspec.html"><strong>tvalspec</strong></a>.