Skip to content

Commit

Permalink
Merge pull request rust-lang#3861 from biabbas/vxworks
Browse files Browse the repository at this point in the history
VxWorks: Add some functions from `vxCpuLib.h` and `taskLib.h`
  • Loading branch information
tgross35 authored Aug 21, 2024
2 parents 1178c25 + 7cf499d commit 72cb7aa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/vxworks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,10 @@ extern "C" {
pub fn taskIdSelf() -> ::TASK_ID;
pub fn taskDelay(ticks: ::_Vx_ticks_t) -> ::c_int;

// taskLib.h
pub fn taskNameSet(task_id: ::TASK_ID, task_name: *mut ::c_char) -> ::c_int;
pub fn taskNameGet(task_id: ::TASK_ID, buf_name: *mut ::c_char, bufsize: ::size_t) -> ::c_int;

// rtpLibCommon.h
pub fn rtpInfoGet(rtpId: ::RTP_ID, rtpStruct: *mut ::RTP_DESC) -> ::c_int;
pub fn rtpSpawn(
Expand Down Expand Up @@ -1872,6 +1876,10 @@ extern "C" {
) -> ::c_int;
pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int;

// vxCpuLib.h
fn vxCpuEnabledGet() -> ::cpuset_t; // Get set of running CPU's in the system
fn vxCpuConfiguredGet() -> ::cpuset_t; // Get set of Configured CPU's in the system
}

//Dummy functions, these don't really exist in VxWorks.
Expand Down

0 comments on commit 72cb7aa

Please sign in to comment.