LCOV - code coverage report
Current view: top level - arch/x86/include/asm - types.h (source / functions) Hit Total Coverage
Test: coverage3.info Lines: 4 4 100.0 %
Date: 2014-04-22 Functions: 0 0 -
Branches: 2 2 100.0 %

           Branch data     Line data    Source code
       1                 :            : #ifndef __CR_ASM_TYPES_H__
       2                 :            : #define __CR_ASM_TYPES_H__
       3                 :            : 
       4                 :            : #include <stdbool.h>
       5                 :            : #include <signal.h>
       6                 :            : 
       7                 :            : #include "asm-generic/page.h"
       8                 :            : #include "asm/bitops.h"
       9                 :            : #include "asm/int.h"
      10                 :            : #include "asm/prlimit.h"
      11                 :            : 
      12                 :            : #include "protobuf/core.pb-c.h"
      13                 :            : 
      14                 :            : #define SIGMAX                  64
      15                 :            : #define SIGMAX_OLD              31
      16                 :            : 
      17                 :            : #define MAJOR(dev)              ((dev)>>8)
      18                 :            : #define MINOR(dev)              ((dev) & 0xff)
      19                 :            : 
      20                 :            : typedef void rt_signalfn_t(int, siginfo_t *, void *);
      21                 :            : typedef rt_signalfn_t *rt_sighandler_t;
      22                 :            : 
      23                 :            : typedef void rt_restorefn_t(void);
      24                 :            : typedef rt_restorefn_t *rt_sigrestore_t;
      25                 :            : 
      26                 :            : #define _KNSIG           64
      27                 :            : # define _NSIG_BPW      64
      28                 :            : 
      29                 :            : #define _KNSIG_WORDS     (_KNSIG / _NSIG_BPW)
      30                 :            : 
      31                 :            : typedef struct {
      32                 :            :         unsigned long sig[_KNSIG_WORDS];
      33                 :            : } k_rtsigset_t;
      34                 :            : 
      35                 :            : static inline void ksigfillset(k_rtsigset_t *set)
      36                 :            : {
      37                 :            :         int i;
      38         [ +  + ]:      24762 :         for (i = 0; i < _KNSIG_WORDS; i++)
      39                 :      12381 :                 set->sig[i] = (unsigned long)-1;
      40                 :            : }
      41                 :            : 
      42                 :            : #define SA_RESTORER     0x04000000
      43                 :            : 
      44                 :            : typedef struct {
      45                 :            :         rt_sighandler_t rt_sa_handler;
      46                 :            :         unsigned long   rt_sa_flags;
      47                 :            :         rt_sigrestore_t rt_sa_restorer;
      48                 :            :         k_rtsigset_t    rt_sa_mask;
      49                 :            : } rt_sigaction_t;
      50                 :            : 
      51                 :            : typedef struct {
      52                 :            :         unsigned int    entry_number;
      53                 :            :         unsigned int    base_addr;
      54                 :            :         unsigned int    limit;
      55                 :            :         unsigned int    seg_32bit:1;
      56                 :            :         unsigned int    contents:2;
      57                 :            :         unsigned int    read_exec_only:1;
      58                 :            :         unsigned int    limit_in_pages:1;
      59                 :            :         unsigned int    seg_not_present:1;
      60                 :            :         unsigned int    useable:1;
      61                 :            :         unsigned int    lm:1;
      62                 :            : } user_desc_t;
      63                 :            : 
      64                 :            : typedef struct {
      65                 :            :         unsigned long   r15;
      66                 :            :         unsigned long   r14;
      67                 :            :         unsigned long   r13;
      68                 :            :         unsigned long   r12;
      69                 :            :         unsigned long   bp;
      70                 :            :         unsigned long   bx;
      71                 :            :         unsigned long   r11;
      72                 :            :         unsigned long   r10;
      73                 :            :         unsigned long   r9;
      74                 :            :         unsigned long   r8;
      75                 :            :         unsigned long   ax;
      76                 :            :         unsigned long   cx;
      77                 :            :         unsigned long   dx;
      78                 :            :         unsigned long   si;
      79                 :            :         unsigned long   di;
      80                 :            :         unsigned long   orig_ax;
      81                 :            :         unsigned long   ip;
      82                 :            :         unsigned long   cs;
      83                 :            :         unsigned long   flags;
      84                 :            :         unsigned long   sp;
      85                 :            :         unsigned long   ss;
      86                 :            :         unsigned long   fs_base;
      87                 :            :         unsigned long   gs_base;
      88                 :            :         unsigned long   ds;
      89                 :            :         unsigned long   es;
      90                 :            :         unsigned long   fs;
      91                 :            :         unsigned long   gs;
      92                 :            : } user_regs_struct_t;
      93                 :            : 
      94                 :            : typedef struct {
      95                 :            :         unsigned short  cwd;
      96                 :            :         unsigned short  swd;
      97                 :            :         unsigned short  twd;    /* Note this is not the same as
      98                 :            :                                    the 32bit/x87/FSAVE twd */
      99                 :            :         unsigned short  fop;
     100                 :            :         u64             rip;
     101                 :            :         u64             rdp;
     102                 :            :         u32             mxcsr;
     103                 :            :         u32             mxcsr_mask;
     104                 :            :         u32             st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
     105                 :            :         u32             xmm_space[64];  /* 16*16 bytes for each XMM-reg = 256 bytes */
     106                 :            :         u32             padding[24];
     107                 :            : } user_fpregs_struct_t;
     108                 :            : 
     109                 :            : #define ASSIGN_TYPED(a, b) do { a = (typeof(a))b; } while (0)
     110                 :            : #define ASSIGN_MEMBER(a,b,m) do { ASSIGN_TYPED((a)->m, (b)->m); } while (0)
     111                 :            : 
     112                 :            : #define TASK_SIZE ((1UL << 47) - PAGE_SIZE)
     113                 :            : 
     114                 :            : typedef u64 auxv_t;
     115                 :            : typedef u32 tls_t;
     116                 :            : 
     117                 :            : #define REG_RES(regs) ((regs).ax)
     118                 :            : #define REG_IP(regs)  ((regs).ip)
     119                 :            : #define REG_SYSCALL_NR(regs)    ((regs).orig_ax)
     120                 :            : 
     121                 :            : #define CORE_ENTRY__MARCH CORE_ENTRY__MARCH__X86_64
     122                 :            : 
     123                 :            : #define AT_VECTOR_SIZE 44
     124                 :            : 
     125                 :            : #define CORE_THREAD_ARCH_INFO(core) core->thread_info
     126                 :            : 
     127                 :            : typedef UserX86RegsEntry UserRegsEntry;
     128                 :            : 
     129                 :     348678 : static inline u64 encode_pointer(void *p) { return (u64)p; }
     130                 :    1419923 : static inline void *decode_pointer(u64 v) { return (void*)v; }
     131                 :            : 
     132                 :            : #endif /* __CR_ASM_TYPES_H__ */

Generated by: LCOV version 1.9