Skip to content

DUSIX bricklet documentation

tamirs edited this page Jun 4, 2012 · 2 revisions

What is DUSIX

DUSIX is a module that abstracts common system calls, providing a single interface for Linux and Windows user space applications and for Linux kernel modules.

Bricklet architecture and operation

DUSIX bricklet concepts:

  • Single interface.
  • Complete code abstraction for the supported OS services.

DUSIX components:

  • include dir exposing DUSIX interface.
  • src dir containing implementations for the different environments.
  • src/test dir containing a sample application/module that tests the abstraction layer.

Supported services:

  • atomic operations.
  • events.
  • logger.
  • memory.
  • mutex.
  • rmlock.
  • threads.

Important Note: Some modules expose only part of a functionality of a specific system service. This is a work in progress, we add more functionality when we find the need to.

Source tree organization:

  • src - source root dir.
    • linux - Linux specific code.
      • user - Linux user space specific code.
      • kernel - Linux kernel space specific code.
      • shared - Linux specific code, shared between user and kernel space.
    • windows - Windows specific code.
      • user - Windows user space specific code.
    • std - Code that relies on std libraries.
    • shared - code shared between all platforms.

Integration and usage

Linux application:

  • run make is dusix root dir to build sample application. will also build dusix.a static lib.
  • run make slib in dusix root dir to build dusix.a only.
  • link your application to dusix.a. (needs -lrt and -lpthread flags.)

Linux kernel module:

  • run make -f Kbuild to build a loadable sample kernel module.

Windows Application:

  • if using Visual Studio add VSDUSIX project to your solution.

Alternatively, you can just add the dusix files to your build. Please refer to DUSIX_SOURCE file list in main makefile for Windows/Linux applications or DUSIX_KSOURCE file list in Kbuild file for Linux kernel modules.

Planned additions

  • Add support for Windows Kernel