view include/TaskManager/types.h @ 88:504899860e66

*** empty log message ***
author gongo
date Wed, 27 Feb 2008 17:16:29 +0900
parents 519d24aa7ac8
children 5c194c71eca8
line wrap: on
line source

#ifndef INCLUDED_TYPES
#define INCLUDED_TYPES

typedef unsigned int       uint32;
typedef unsigned long long uint64;

#define SPE_ALIGNMENT 16
#define SPE_ALIGNMENT_FULL 128
#define SPE_ALIGN __attribute__((aligned(SPE_ALIGNMENT)))
#define SPE_ALIGN_FULL __attribute__((aligned(SPE_ALIGNMENT_FULL))
#define ROUND_UP_ALIGN(value, alignment) \
    (((value) + ((alignment) - 1))&(~((alignment)-1)))
#define DEFAULT_ALIGNMENT SPE_ALIGNMENT

#define DMA_MAX_SIZE 16384

#define round_up16(value)  ROUND_UP_ALIGN(value, 16)
#define round_up128(value) ROUND_UP_ALIGN(value, 128)

// ここも typedef しとくか?
enum {
    MY_SPE_COMMAND_EXIT,
    MY_SPE_COMMAND_GO,

    MY_SPE_STATUS_BUSY,
    MY_SPE_STATUS_READY
};

typedef enum {
    CPU_PPE, // default
    CPU_SPE
} CPU_TYPE;

#endif