]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/mapped_tvalspec.html
xnu-792.6.70.tar.gz
[apple/xnu.git] / osfmk / man / mapped_tvalspec.html
CommitLineData
9bccf70c 1<h2>mapped_tvalspec</h2>\r<hr>\r<p>\r<strong>Structure</strong> - Specifies the format the kernel uses to maintain a mapped clock's time.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>struct mapped_tvalspec</strong>\r<strong>{</strong>\r <strong>tvalspec_t</strong> <var>mtv_time</var><strong>;</strong>\r <strong>unsigned int</strong> <var>mtv_csec</var><strong>;</strong>\r<strong>};</strong>\r\r<strong>typedef struct mapped_tvalspec mapped_tvalspec_t;</strong>\r</pre>\r<h3>FIELDS</h3>\r<dl>\r<dt> <var>mtv_time</var>\r<dd>\rClock time.\r<p>\r<dt> <var>mtv_csec</var>\r<dd>\rA field used to synchronize with the kernel's setting of the time.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>mapped_tvalspec</strong> structure defines the format of the \rcurrent-time structure \rmaintained by the kernel and visible through a mapped clock \r(<strong>clock_map_time</strong>). The data in this structure is updated at the \rclock's current resolution and contains the same <strong>tvalspec</strong> value that \rwould be returned by <strong>clock_get_time</strong>.\r<h3>NOTES</h3>\r<p>\rBecause of the race between the referencing of the multiple fields\rin the clock \rvalue and the kernel's setting them, they should be referenced as follows:\r<p>\r<pre>\r <strong>tvalspec_t* ts;</strong>\r <strong>do</strong>\r <strong>{</strong>\r <strong>ts-> tv_sec = mtime -> mtv_time.tv_sec;</strong>\r <strong>ts -> tv_nsec = mtime -> mtv_time.tv_nsec;</strong>\r <strong>} while (ts -> tv_sec != mtime -> mtv_csec);</strong>\r</pre>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="clock_map_time.html"><strong>clock_map_time</strong></a>,\r<a href="clock_get_time.html"><strong>clock_get_time</strong></a>.\r<p>\rData Structures:\r<a href="tvalspec.html"><strong>tvalspec</strong></a>.\r