File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,6 +139,35 @@ extern "C" {
139139pub type SysCallHandler = _SysCallHandler ;
140140#[ repr( C ) ]
141141#[ derive( Debug , Copy , Clone ) ]
142+ pub struct _Tsc {
143+ pub cyclesPerSecond : u64 ,
144+ }
145+ #[ test]
146+ fn bindgen_test_layout__Tsc ( ) {
147+ assert_eq ! (
148+ :: std:: mem:: size_of:: <_Tsc>( ) ,
149+ 8usize ,
150+ concat!( "Size of: " , stringify!( _Tsc) )
151+ ) ;
152+ assert_eq ! (
153+ :: std:: mem:: align_of:: <_Tsc>( ) ,
154+ 8usize ,
155+ concat!( "Alignment of " , stringify!( _Tsc) )
156+ ) ;
157+ assert_eq ! (
158+ unsafe { & ( * ( :: std:: ptr:: null:: <_Tsc>( ) ) ) . cyclesPerSecond as * const _ as usize } ,
159+ 0usize ,
160+ concat!(
161+ "Offset of field: " ,
162+ stringify!( _Tsc) ,
163+ "::" ,
164+ stringify!( cyclesPerSecond)
165+ )
166+ ) ;
167+ }
168+ pub type Tsc = _Tsc ;
169+ #[ repr( C ) ]
170+ #[ derive( Debug , Copy , Clone ) ]
142171pub struct _CPU {
143172 _unused : [ u8 ; 0 ] ,
144173}
@@ -1249,6 +1278,9 @@ extern "C" {
12491278extern "C" {
12501279 pub fn host_getCPU ( host : * mut Host ) -> * mut CPU ;
12511280}
1281+ extern "C" {
1282+ pub fn host_getTsc ( host : * mut Host ) -> * mut Tsc ;
1283+ }
12521284extern "C" {
12531285 pub fn host_getName ( host : * mut Host ) -> * mut gchar ;
12541286}
You can’t perform that action at this time.
0 commit comments