akaros/kern/arch/riscv/types.h
<<
>>
Prefs
   1#pragma once
   2
   3#include <stddef.h>
   4
   5#define LITTLE_ENDIAN
   6
   7#ifdef __riscv64
   8# define NUM_ADDR_BITS 64
   9#else
  10# define NUM_ADDR_BITS 32
  11#endif
  12
  13#define MAX_VADDR     ((uint64_t)(~0) >> (64-NUM_ADDR_BITS))
  14
  15// Explicitly-sized versions of integer types
  16typedef __signed char int8_t;
  17typedef unsigned char uint8_t;
  18typedef short int16_t;
  19typedef unsigned short uint16_t;
  20typedef int int32_t;
  21typedef unsigned int uint32_t;
  22typedef long long int64_t;
  23typedef unsigned long long uint64_t;
  24
  25typedef int64_t ssize_t;
  26typedef int32_t pid_t;
  27typedef int32_t uid_t;
  28typedef int32_t gid_t;
  29
  30typedef unsigned long uintptr_t;
  31typedef signed long intptr_t;
  32