Ticket #2870: header-patch.diff
File header-patch.diff, 136.2 KB (added by , 15 years ago) |
---|
-
media/RealtimeAlloc.h
47 47 } 48 48 #endif 49 49 50 #endif / / _REALTIME_ALLOC_H50 #endif /* _REALTIME_ALLOC_H */ 51 51 -
kernel/fs_query.h
13 13 /* Flags for fs_open_[live_]query() */ 14 14 15 15 #define B_LIVE_QUERY 0x00000001 16 / / Note, if you specify B_LIVE_QUERY, you have to use fs_open_live_query();17 / / it will be ignored in fs_open_query().16 /* Note, if you specify B_LIVE_QUERY, you have to use fs_open_live_query(); */ 17 /* it will be ignored in fs_open_query(). */ 18 18 #define B_QUERY_NON_INDEXED 0x00000002 19 / / Only enable this feature for non time-critical things, it might20 / / take a long time to proceed.21 / / Also, not every file system might support this feature.19 /* Only enable this feature for non time-critical things, it might */ 20 /* take a long time to proceed. */ 21 /* Also, not every file system might support this feature. */ 22 22 23 23 24 24 #ifdef __cplusplus -
kernel/fs_volume.h
5 5 #ifndef _FS_VOLUME_H 6 6 #define _FS_VOLUME_H 7 7 8 / /! File System volume functions8 /*! File System volume functions */ 9 9 10 10 #include <OS.h> 11 11 -
kernel/fs_attr.h
25 25 extern int fs_remove_attr(int fd, const char *attribute); 26 26 extern int fs_stat_attr(int fd, const char *attribute, struct attr_info *attrInfo); 27 27 28 / / ToDo: the following three functions are not part of the R5 API, and29 / / are only preliminary - they may change or be removed at any point30 / /extern int fs_open_attr(const char *path, const char *attribute, uint32 type, int openMode);28 /* ToDo: the following three functions are not part of the R5 API, and */ 29 /* are only preliminary - they may change or be removed at any point */ 30 /*extern int fs_open_attr(const char *path, const char *attribute, uint32 type, int openMode); */ 31 31 extern int fs_open_attr(int fd, const char *attribute, uint32 type, int openMode); 32 32 extern int fs_close_attr(int fd); 33 33 -
kernel/image.h
35 35 int32 data_size; 36 36 } image_info; 37 37 38 / / flags for clear_caches()38 /* flags for clear_caches() */ 39 39 #define B_FLUSH_DCACHE 0x0001 /* data cache */ 40 40 #define B_FLUSH_ICACHE 0x0004 /* instruction cache */ 41 41 #define B_INVALIDATE_DCACHE 0x0002 42 42 #define B_INVALIDATE_ICACHE 0x0008 43 43 44 / / symbol types44 /* symbol types */ 45 45 #define B_SYMBOL_TYPE_DATA 0x1 46 46 #define B_SYMBOL_TYPE_TEXT 0x2 47 47 #define B_SYMBOL_TYPE_ANY 0x5 48 48 49 / / initialization/termination functions of shared objects49 /* initialization/termination functions of shared objects */ 50 50 #define B_INIT_BEFORE_FUNCTION_NAME "initialize_before" 51 51 #define B_INIT_AFTER_FUNCTION_NAME "initialize_after" 52 52 #define B_TERM_BEFORE_FUNCTION_NAME "terminate_before" 53 53 #define B_TERM_AFTER_FUNCTION_NAME "terminate_after" 54 54 55 / / flags for _kern_load_image() (private API)55 /* flags for _kern_load_image() (private API) */ 56 56 enum { 57 57 B_WAIT_TILL_LOADED = 0x01, 58 / / Wait till the loader has loaded and relocated59 / / (but not yet initialized) the application60 / / image and all dependencies. If not supplied,61 / / the function returns before the loader62 / / started to do anything at all, i.e. it63 / / returns success, even if the executable64 / / doesn't exist.58 /* Wait till the loader has loaded and relocated */ 59 /* (but not yet initialized) the application */ 60 /* image and all dependencies. If not supplied, */ 61 /* the function returns before the loader */ 62 /* started to do anything at all, i.e. it */ 63 /* returns success, even if the executable */ 64 /* doesn't exist. */ 65 65 }; 66 66 67 67 #ifdef __cplusplus -
kernel/disk_scanner.h
11 11 #include <SupportDefs.h> 12 12 13 13 14 / / session flags14 /* session flags */ 15 15 enum { 16 16 B_DATA_SESSION = 0x01, /* data session */ 17 17 B_VIRTUAL_SESSION = 0x02, /* e.g. hard disk */ … … 25 25 uint32 flags; /* session flags */ 26 26 } session_info; 27 27 28 / / partition flags28 /* partition flags */ 29 29 enum { 30 30 B_HIDDEN_PARTITION = 0x01, /* non-file system partition */ 31 31 B_VIRTUAL_PARTITION = 0x02, /* e.g. floppy */ … … 49 49 extern "C" { 50 50 #endif 51 51 52 / / getting infos52 /* getting infos */ 53 53 status_t get_nth_session_info(int deviceFD, int32 index, 54 54 session_info *sessionInfo); 55 55 status_t get_nth_partition_info(int deviceFD, int32 sessionIndex, … … 57 57 extended_partition_info *partitionInfo, 58 58 char *partitionMapName); 59 59 60 / / partitioning60 /* partitioning */ 61 61 status_t get_partitioning_parameters(int deviceFD, int32 sessionIndex, 62 62 const char *identifier, char *buffer, 63 63 size_t bufferSize, size_t *actualSize); 64 64 status_t partition_session(int deviceFD, int32 sessionIndex, 65 65 const char *identifier, const char *parameters); 66 66 67 / / initialization67 /* initialization */ 68 68 status_t get_fs_initialization_parameters(int deviceFD, int32 sessionIndex, 69 69 int32 partitionIndex, 70 70 const char *fileSystem, char *buffer, 71 71 size_t bufferSize, 72 72 size_t *actualSize); 73 / / TODO: Move to <unistd.h>. It fits better there.73 /* TODO: Move to <unistd.h>. It fits better there. */ 74 74 status_t initialize_volume(const char *where, const char *fileSystem, 75 75 const char *volumeName, const char *parameters); 76 76 -
kernel/fs_info.h
16 16 #define B_FS_HAS_MIME 0x00010000 17 17 #define B_FS_HAS_ATTR 0x00020000 18 18 #define B_FS_HAS_QUERY 0x00040000 19 / / those additions are preliminary and may be removed19 /* those additions are preliminary and may be removed */ 20 20 #define B_FS_HAS_SELF_HEALING_LINKS 0x00080000 21 21 #define B_FS_HAS_ALIASES 0x00100000 22 22 #define B_FS_SUPPORTS_NODE_MONITORING 0x00200000 -
kernel/debugger.h
10 10 #include <image.h> 11 11 #include <OS.h> 12 12 13 / / include architecture specific definitions13 /* include architecture specific definitions */ 14 14 #ifdef __INTEL__ 15 15 #include <arch/x86/arch_debugger.h> 16 16 #elif __POWERPC__ … … 33 33 extern status_t debug_thread(thread_id thread); 34 34 extern void wait_for_debugger(void); 35 35 36 / / EXPERIMENTAL: Self-debugging functions. Will fail when a team debugger is37 / / installed. A breakpoint/watchpoint hit will cause the default debugger to38 / / be installed for the team.36 /* EXPERIMENTAL: Self-debugging functions. Will fail when a team debugger is */ 37 /* installed. A breakpoint/watchpoint hit will cause the default debugger to */ 38 /* be installed for the team. */ 39 39 extern status_t set_debugger_breakpoint(void *address); 40 40 extern status_t clear_debugger_breakpoint(void *address); 41 41 extern status_t set_debugger_watchpoint(void *address, uint32 type, … … 43 43 extern status_t clear_debugger_watchpoint(void *address); 44 44 45 45 46 / / team debugging flags46 /* team debugging flags */ 47 47 enum { 48 / / event mask: If a flag is set, any of the team's threads will stop when49 / / the respective event occurs. All flags are enabled by default. Always50 / / enabled are debugger() calls and hardware exceptions, as well as the51 / / deletion of the debugged team.48 /* event mask: If a flag is set, any of the team's threads will stop when */ 49 /* the respective event occurs. All flags are enabled by default. Always */ 50 /* enabled are debugger() calls and hardware exceptions, as well as the */ 51 /* deletion of the debugged team. */ 52 52 B_TEAM_DEBUG_SIGNALS = 0x00010000, 53 53 B_TEAM_DEBUG_PRE_SYSCALL = 0x00020000, 54 54 B_TEAM_DEBUG_POST_SYSCALL = 0x00040000, … … 56 56 B_TEAM_DEBUG_THREADS = 0x00100000, 57 57 B_TEAM_DEBUG_IMAGES = 0x00200000, 58 58 59 / / new thread handling59 /* new thread handling */ 60 60 B_TEAM_DEBUG_STOP_NEW_THREADS = 0x01000000, 61 61 62 62 B_TEAM_DEBUG_USER_FLAG_MASK = 0xffff0000, 63 63 }; 64 64 65 / / per-thread debugging flags65 /* per-thread debugging flags */ 66 66 enum { 67 / / event mask: If a flag is set, the thread will stop when the respective68 / / event occurs. If there is a corresponding team flag, it is sufficient,69 / / if either is set. Per default none of the flags is set.67 /* event mask: If a flag is set, the thread will stop when the respective */ 68 /* event occurs. If there is a corresponding team flag, it is sufficient, */ 69 /* if either is set. Per default none of the flags is set. */ 70 70 B_THREAD_DEBUG_PRE_SYSCALL = 0x00010000, 71 71 B_THREAD_DEBUG_POST_SYSCALL = 0x00020000, 72 72 73 / / child thread handling73 /* child thread handling */ 74 74 B_THREAD_DEBUG_STOP_CHILD_THREADS = 0x00100000, 75 75 B_THREAD_DEBUG_SYSCALL_TRACE_CHILD_THREADS = 0x00200000, 76 76 77 77 B_THREAD_DEBUG_USER_FLAG_MASK = 0xffff0000, 78 78 }; 79 79 80 / / in case of a B_EXCEPTION_OCCURRED event: the type of the exception80 /* in case of a B_EXCEPTION_OCCURRED event: the type of the exception */ 81 81 typedef enum { 82 82 B_NON_MASKABLE_INTERRUPT = 0, 83 83 B_MACHINE_CHECK_EXCEPTION, … … 93 93 B_FLOATING_POINT_EXCEPTION, 94 94 } debug_exception_type; 95 95 96 / / Value indicating how a stopped thread shall continue.96 /* Value indicating how a stopped thread shall continue. */ 97 97 enum { 98 B_THREAD_DEBUG_HANDLE_EVENT = 0, / / handle the event normally99 / / (e.g. a signal is delivered, a100 / / CPU fault kills the team,...)101 B_THREAD_DEBUG_IGNORE_EVENT, / / ignore the event and continue as if102 / / it didn't occur (e.g. a signal or103 / / a CPU fault will be ignored)98 B_THREAD_DEBUG_HANDLE_EVENT = 0, /* handle the event normally */ 99 /* (e.g. a signal is delivered, a */ 100 /* CPU fault kills the team,...) */ 101 B_THREAD_DEBUG_IGNORE_EVENT, /* ignore the event and continue as if */ 102 /* it didn't occur (e.g. a signal or */ 103 /* a CPU fault will be ignored) */ 104 104 }; 105 105 106 / / watchpoint types (ToDo: Check PPC support.)106 /* watchpoint types (ToDo: Check PPC support.) */ 107 107 enum { 108 B_DATA_READ_WATCHPOINT = 0, / / !x86108 B_DATA_READ_WATCHPOINT = 0, /* !x86 */ 109 109 B_DATA_WRITE_WATCHPOINT, 110 110 B_DATA_READ_WRITE_WATCHPOINT, 111 111 }; 112 112 113 / / how to apply signal ignore masks113 /* how to apply signal ignore masks */ 114 114 typedef enum { 115 115 B_DEBUG_SIGNAL_MASK_AND = 0, 116 116 B_DEBUG_SIGNAL_MASK_OR, … … 119 119 120 120 #define B_DEBUG_SIGNAL_TO_MASK(signal) (1ULL << ((signal) - 1)) 121 121 122 / / maximal number of bytes to read/write via B_DEBUG_MESSAGE_{READ,WRITE]_MEMORY122 /* maximal number of bytes to read/write via B_DEBUG_MESSAGE_{READ,WRITE]_MEMORY */ 123 123 enum { 124 124 B_MAX_READ_WRITE_MEMORY_SIZE = 1024, 125 125 }; 126 126 127 / / messages to the debug nub thread127 /* messages to the debug nub thread */ 128 128 typedef enum { 129 B_DEBUG_MESSAGE_READ_MEMORY = 0, / / read from the team's memory130 B_DEBUG_MESSAGE_WRITE_MEMORY, / / write to the team's memory131 B_DEBUG_MESSAGE_SET_TEAM_FLAGS, / / set the team's debugging flags132 B_DEBUG_MESSAGE_SET_THREAD_FLAGS, / / set a thread's debugging flags133 B_DEBUG_MESSAGE_CONTINUE_THREAD, / / continue a stopped thread134 B_DEBUG_MESSAGE_SET_CPU_STATE, / / change a stopped thread's CPU state135 B_DEBUG_MESSAGE_GET_CPU_STATE, / / get the thread's current CPU state136 B_DEBUG_MESSAGE_SET_BREAKPOINT, / / set a breakpoint137 B_DEBUG_MESSAGE_CLEAR_BREAKPOINT, / / clear a breakpoint138 B_DEBUG_MESSAGE_SET_WATCHPOINT, / / set a watchpoint139 B_DEBUG_MESSAGE_CLEAR_WATCHPOINT, / / clear a watchpoint140 B_DEBUG_MESSAGE_SET_SIGNAL_MASKS, / / set/get a thread's masks of signals141 B_DEBUG_MESSAGE_GET_SIGNAL_MASKS, / / the debugger is interested in142 B_DEBUG_MESSAGE_SET_SIGNAL_HANDLER, / / set/get a thread's signal handler for143 B_DEBUG_MESSAGE_GET_SIGNAL_HANDLER, / / a signal129 B_DEBUG_MESSAGE_READ_MEMORY = 0, /* read from the team's memory */ 130 B_DEBUG_MESSAGE_WRITE_MEMORY, /* write to the team's memory */ 131 B_DEBUG_MESSAGE_SET_TEAM_FLAGS, /* set the team's debugging flags */ 132 B_DEBUG_MESSAGE_SET_THREAD_FLAGS, /* set a thread's debugging flags */ 133 B_DEBUG_MESSAGE_CONTINUE_THREAD, /* continue a stopped thread */ 134 B_DEBUG_MESSAGE_SET_CPU_STATE, /* change a stopped thread's CPU state */ 135 B_DEBUG_MESSAGE_GET_CPU_STATE, /* get the thread's current CPU state */ 136 B_DEBUG_MESSAGE_SET_BREAKPOINT, /* set a breakpoint */ 137 B_DEBUG_MESSAGE_CLEAR_BREAKPOINT, /* clear a breakpoint */ 138 B_DEBUG_MESSAGE_SET_WATCHPOINT, /* set a watchpoint */ 139 B_DEBUG_MESSAGE_CLEAR_WATCHPOINT, /* clear a watchpoint */ 140 B_DEBUG_MESSAGE_SET_SIGNAL_MASKS, /* set/get a thread's masks of signals */ 141 B_DEBUG_MESSAGE_GET_SIGNAL_MASKS, /* the debugger is interested in */ 142 B_DEBUG_MESSAGE_SET_SIGNAL_HANDLER, /* set/get a thread's signal handler for */ 143 B_DEBUG_MESSAGE_GET_SIGNAL_HANDLER, /* a signal */ 144 144 145 B_DEBUG_MESSAGE_PREPARE_HANDOVER, / / prepares the debugged team for being146 / / handed over to another debugger;147 / / the new debugger can just invoke148 / / install_team_debugger()145 B_DEBUG_MESSAGE_PREPARE_HANDOVER, /* prepares the debugged team for being */ 146 /* handed over to another debugger; */ 147 /* the new debugger can just invoke */ 148 /* install_team_debugger() */ 149 149 150 B_DEBUG_START_PROFILER, / / start/stop sampling151 B_DEBUG_STOP_PROFILER / /150 B_DEBUG_START_PROFILER, /* start/stop sampling */ 151 B_DEBUG_STOP_PROFILER /* */ 152 152 } debug_nub_message; 153 153 154 / / messages sent to the debugger154 /* messages sent to the debugger */ 155 155 typedef enum { 156 B_DEBUGGER_MESSAGE_THREAD_DEBUGGED = 0, / / debugger message in reaction to157 / / an invocation of debug_thread()158 B_DEBUGGER_MESSAGE_DEBUGGER_CALL, / / thread called debugger()159 B_DEBUGGER_MESSAGE_BREAKPOINT_HIT, / / thread hit a breakpoint160 B_DEBUGGER_MESSAGE_WATCHPOINT_HIT, / / thread hit a watchpoint161 B_DEBUGGER_MESSAGE_SINGLE_STEP, / / thread was single-stepped162 B_DEBUGGER_MESSAGE_PRE_SYSCALL, / / begin of a syscall163 B_DEBUGGER_MESSAGE_POST_SYSCALL, / / end of a syscall164 B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED, / / thread received a signal165 B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED, / / an exception occurred166 B_DEBUGGER_MESSAGE_TEAM_CREATED, / / the debugged team created a new167 / / one168 B_DEBUGGER_MESSAGE_TEAM_DELETED, / / the debugged team is gone169 B_DEBUGGER_MESSAGE_TEAM_EXEC, / / the debugged team executes exec()170 B_DEBUGGER_MESSAGE_THREAD_CREATED, / / a thread has been created171 B_DEBUGGER_MESSAGE_THREAD_DELETED, / / a thread has been deleted172 B_DEBUGGER_MESSAGE_IMAGE_CREATED, / / an image has been created173 B_DEBUGGER_MESSAGE_IMAGE_DELETED, / / an image has been deleted156 B_DEBUGGER_MESSAGE_THREAD_DEBUGGED = 0, /* debugger message in reaction to */ 157 /* an invocation of debug_thread() */ 158 B_DEBUGGER_MESSAGE_DEBUGGER_CALL, /* thread called debugger() */ 159 B_DEBUGGER_MESSAGE_BREAKPOINT_HIT, /* thread hit a breakpoint */ 160 B_DEBUGGER_MESSAGE_WATCHPOINT_HIT, /* thread hit a watchpoint */ 161 B_DEBUGGER_MESSAGE_SINGLE_STEP, /* thread was single-stepped */ 162 B_DEBUGGER_MESSAGE_PRE_SYSCALL, /* begin of a syscall */ 163 B_DEBUGGER_MESSAGE_POST_SYSCALL, /* end of a syscall */ 164 B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED, /* thread received a signal */ 165 B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED, /* an exception occurred */ 166 B_DEBUGGER_MESSAGE_TEAM_CREATED, /* the debugged team created a new */ 167 /* one */ 168 B_DEBUGGER_MESSAGE_TEAM_DELETED, /* the debugged team is gone */ 169 B_DEBUGGER_MESSAGE_TEAM_EXEC, /* the debugged team executes exec() */ 170 B_DEBUGGER_MESSAGE_THREAD_CREATED, /* a thread has been created */ 171 B_DEBUGGER_MESSAGE_THREAD_DELETED, /* a thread has been deleted */ 172 B_DEBUGGER_MESSAGE_IMAGE_CREATED, /* an image has been created */ 173 B_DEBUGGER_MESSAGE_IMAGE_DELETED, /* an image has been deleted */ 174 174 175 B_DEBUGGER_MESSAGE_PROFILER_UPDATE, / / flush the profiling buffer for a176 / / thread175 B_DEBUGGER_MESSAGE_PROFILER_UPDATE, /* flush the profiling buffer for a */ 176 /* thread */ 177 177 178 B_DEBUGGER_MESSAGE_HANDED_OVER, / / the debugged team has been179 / / handed over to another debugger178 B_DEBUGGER_MESSAGE_HANDED_OVER, /* the debugged team has been */ 179 /* handed over to another debugger */ 180 180 } debug_debugger_message; 181 181 182 182 183 / / profile events -- when the buffer is in variable stack depth format, a sample184 / / count entry >= B_DEBUG_PROFILE_EVENT_BASE indicates a profile event183 /* profile events -- when the buffer is in variable stack depth format, a sample */ 184 /* count entry >= B_DEBUG_PROFILE_EVENT_BASE indicates a profile event */ 185 185 enum { 186 186 B_DEBUG_PROFILE_EVENT_BASE = 0x80000000, 187 187 B_DEBUG_PROFILE_EVENT_PARAMETER_MASK = 0x0000ffff, 188 / / & with to get the event's parameter count188 /* & with to get the event's parameter count */ 189 189 190 190 B_DEBUG_PROFILE_IMAGE_EVENT = 0x80010001 191 / / single parameter: the respective image event counter191 /* single parameter: the respective image event counter */ 192 192 }; 193 193 194 194 195 / / #pragma mark -196 / / #pragma mark ----- messages to the debug nub thread -----195 /* #pragma mark - */ 196 /* #pragma mark ----- messages to the debug nub thread ----- */ 197 197 198 / / B_DEBUG_MESSAGE_READ_MEMORY198 /* B_DEBUG_MESSAGE_READ_MEMORY */ 199 199 200 200 typedef struct { 201 port_id reply_port; / / port to send the reply to202 void *address; / / address from which to read203 int32 size; / / number of bytes to read201 port_id reply_port; /* port to send the reply to */ 202 void *address; /* address from which to read */ 203 int32 size; /* number of bytes to read */ 204 204 } debug_nub_read_memory; 205 205 206 206 typedef struct { 207 status_t error; / / B_OK, if reading went fine208 int32 size; / / the number of bytes actually read209 / / > 0, iff error == B_OK207 status_t error; /* B_OK, if reading went fine */ 208 int32 size; /* the number of bytes actually read */ 209 /* > 0, iff error == B_OK */ 210 210 char data[B_MAX_READ_WRITE_MEMORY_SIZE]; 211 / / the read data211 /* the read data */ 212 212 } debug_nub_read_memory_reply; 213 213 214 / / B_DEBUG_MESSAGE_WRITE_MEMORY214 /* B_DEBUG_MESSAGE_WRITE_MEMORY */ 215 215 216 216 typedef struct { 217 port_id reply_port; / / port to send the reply to218 void *address; / / address to which to write219 int32 size; / / number of bytes to write217 port_id reply_port; /* port to send the reply to */ 218 void *address; /* address to which to write */ 219 int32 size; /* number of bytes to write */ 220 220 char data[B_MAX_READ_WRITE_MEMORY_SIZE]; 221 / / data to write221 /* data to write */ 222 222 } debug_nub_write_memory; 223 223 224 224 typedef struct { 225 status_t error; / / B_OK, if writing went fine226 int32 size; / / the number of bytes actually written225 status_t error; /* B_OK, if writing went fine */ 226 int32 size; /* the number of bytes actually written */ 227 227 } debug_nub_write_memory_reply; 228 228 229 / / B_DEBUG_MESSAGE_SET_TEAM_FLAGS229 /* B_DEBUG_MESSAGE_SET_TEAM_FLAGS */ 230 230 231 231 typedef struct { 232 int32 flags; / / the new team debugging flags232 int32 flags; /* the new team debugging flags */ 233 233 } debug_nub_set_team_flags; 234 234 235 / / B_DEBUG_MESSAGE_SET_THREAD_FLAGS235 /* B_DEBUG_MESSAGE_SET_THREAD_FLAGS */ 236 236 237 237 typedef struct { 238 thread_id thread; / / the thread239 int32 flags; / / the new thread debugging flags238 thread_id thread; /* the thread */ 239 int32 flags; /* the new thread debugging flags */ 240 240 } debug_nub_set_thread_flags; 241 241 242 / / B_DEBUG_MESSAGE_CONTINUE_THREAD242 /* B_DEBUG_MESSAGE_CONTINUE_THREAD */ 243 243 244 244 typedef struct { 245 thread_id thread; / / the thread246 uint32 handle_event; / / how to handle the occurred event247 bool single_step; / / true == single step, false == run full speed245 thread_id thread; /* the thread */ 246 uint32 handle_event; /* how to handle the occurred event */ 247 bool single_step; /* true == single step, false == run full speed */ 248 248 } debug_nub_continue_thread; 249 249 250 / / B_DEBUG_MESSAGE_SET_CPU_STATE250 /* B_DEBUG_MESSAGE_SET_CPU_STATE */ 251 251 252 252 typedef struct { 253 thread_id thread; / / the thread254 debug_cpu_state cpu_state; / / the new CPU state253 thread_id thread; /* the thread */ 254 debug_cpu_state cpu_state; /* the new CPU state */ 255 255 } debug_nub_set_cpu_state; 256 256 257 / / B_DEBUG_MESSAGE_GET_CPU_STATE257 /* B_DEBUG_MESSAGE_GET_CPU_STATE */ 258 258 259 259 typedef struct { 260 port_id reply_port; / / port to send the reply to261 thread_id thread; / / the thread260 port_id reply_port; /* port to send the reply to */ 261 thread_id thread; /* the thread */ 262 262 } debug_nub_get_cpu_state; 263 263 264 264 typedef struct { 265 status_t error; / / != B_OK, if something went wrong266 / / (bad thread ID, thread not stopped)267 debug_debugger_message message; / / the reason why the thread stopped268 debug_cpu_state cpu_state; / / the thread's CPU state265 status_t error; /* != B_OK, if something went wrong */ 266 /* (bad thread ID, thread not stopped) */ 267 debug_debugger_message message; /* the reason why the thread stopped */ 268 debug_cpu_state cpu_state; /* the thread's CPU state */ 269 269 } debug_nub_get_cpu_state_reply; 270 270 271 / / B_DEBUG_MESSAGE_SET_BREAKPOINT271 /* B_DEBUG_MESSAGE_SET_BREAKPOINT */ 272 272 273 273 typedef struct { 274 port_id reply_port; / / port to send the reply to275 void *address; / / breakpoint address274 port_id reply_port; /* port to send the reply to */ 275 void *address; /* breakpoint address */ 276 276 } debug_nub_set_breakpoint; 277 277 278 278 typedef struct { 279 status_t error; / / B_OK, if the breakpoint has been set280 / / successfully279 status_t error; /* B_OK, if the breakpoint has been set */ 280 /* successfully */ 281 281 } debug_nub_set_breakpoint_reply; 282 282 283 / / B_DEBUG_MESSAGE_CLEAR_BREAKPOINT283 /* B_DEBUG_MESSAGE_CLEAR_BREAKPOINT */ 284 284 285 285 typedef struct { 286 void *address; / / breakpoint address286 void *address; /* breakpoint address */ 287 287 } debug_nub_clear_breakpoint; 288 288 289 / / B_DEBUG_MESSAGE_SET_WATCHPOINT289 /* B_DEBUG_MESSAGE_SET_WATCHPOINT */ 290 290 291 291 typedef struct { 292 port_id reply_port; / / port to send the reply to293 void *address; / / watchpoint address294 uint32 type; / / watchpoint type (see type constants above)295 int32 length; / / number of bytes to watch (typically 1, 2,296 / / 4); architecture specific alignment297 / / restrictions apply.292 port_id reply_port; /* port to send the reply to */ 293 void *address; /* watchpoint address */ 294 uint32 type; /* watchpoint type (see type constants above) */ 295 int32 length; /* number of bytes to watch (typically 1, 2, */ 296 /* 4); architecture specific alignment */ 297 /* restrictions apply. */ 298 298 } debug_nub_set_watchpoint; 299 299 300 300 typedef struct { 301 status_t error; / / B_OK, if the watchpoint has been set302 / / successfully301 status_t error; /* B_OK, if the watchpoint has been set */ 302 /* successfully */ 303 303 } debug_nub_set_watchpoint_reply; 304 304 305 / / B_DEBUG_MESSAGE_CLEAR_WATCHPOINT305 /* B_DEBUG_MESSAGE_CLEAR_WATCHPOINT */ 306 306 307 307 typedef struct { 308 void *address; / / watchpoint address308 void *address; /* watchpoint address */ 309 309 } debug_nub_clear_watchpoint; 310 310 311 / / B_DEBUG_MESSAGE_SET_SIGNAL_MASKS311 /* B_DEBUG_MESSAGE_SET_SIGNAL_MASKS */ 312 312 313 313 typedef struct { 314 thread_id thread; / / the thread315 uint64 ignore_mask; / / the mask for signals the316 / / debugger wishes not to be317 / / notified of318 uint64 ignore_once_mask; / / the mask for signals the319 / / debugger wishes not to be320 / / notified of when they next321 / / occur322 debug_signal_mask_op ignore_op; / / what to do with ignore_mask323 debug_signal_mask_op ignore_once_op; / / what to do with324 / / ignore_once_mask314 thread_id thread; /* the thread */ 315 uint64 ignore_mask; /* the mask for signals the */ 316 /* debugger wishes not to be */ 317 /* notified of */ 318 uint64 ignore_once_mask; /* the mask for signals the */ 319 /* debugger wishes not to be */ 320 /* notified of when they next */ 321 /* occur */ 322 debug_signal_mask_op ignore_op; /* what to do with ignore_mask */ 323 debug_signal_mask_op ignore_once_op; /* what to do with */ 324 /* ignore_once_mask */ 325 325 } debug_nub_set_signal_masks; 326 326 327 / / B_DEBUG_MESSAGE_GET_SIGNAL_MASKS327 /* B_DEBUG_MESSAGE_GET_SIGNAL_MASKS */ 328 328 329 329 typedef struct { 330 port_id reply_port; / / port to send the reply to331 thread_id thread; / / the thread330 port_id reply_port; /* port to send the reply to */ 331 thread_id thread; /* the thread */ 332 332 } debug_nub_get_signal_masks; 333 333 334 334 typedef struct { 335 status_t error; / / B_OK, if the thread exists336 uint64 ignore_mask; / / the mask for signals the debugger wishes337 / / not to be notified of338 uint64 ignore_once_mask; / / the mask for signals the debugger wishes339 / / not to be notified of when they next340 / / occur335 status_t error; /* B_OK, if the thread exists */ 336 uint64 ignore_mask; /* the mask for signals the debugger wishes */ 337 /* not to be notified of */ 338 uint64 ignore_once_mask; /* the mask for signals the debugger wishes */ 339 /* not to be notified of when they next */ 340 /* occur */ 341 341 } debug_nub_get_signal_masks_reply; 342 342 343 / / B_DEBUG_MESSAGE_SET_SIGNAL_HANDLER343 /* B_DEBUG_MESSAGE_SET_SIGNAL_HANDLER */ 344 344 345 345 typedef struct { 346 thread_id thread; / / the thread347 int signal; / / the signal348 struct sigaction handler; / / the new signal handler346 thread_id thread; /* the thread */ 347 int signal; /* the signal */ 348 struct sigaction handler; /* the new signal handler */ 349 349 } debug_nub_set_signal_handler; 350 350 351 / / B_DEBUG_MESSAGE_GET_SIGNAL_HANDLER351 /* B_DEBUG_MESSAGE_GET_SIGNAL_HANDLER */ 352 352 353 353 typedef struct { 354 port_id reply_port; / / port to send the reply to355 thread_id thread; / / the thread356 int signal; / / the signal354 port_id reply_port; /* port to send the reply to */ 355 thread_id thread; /* the thread */ 356 int signal; /* the signal */ 357 357 } debug_nub_get_signal_handler; 358 358 359 359 typedef struct { 360 status_t error; / / B_OK, if the thread exists361 struct sigaction handler; / / the signal handler360 status_t error; /* B_OK, if the thread exists */ 361 struct sigaction handler; /* the signal handler */ 362 362 } debug_nub_get_signal_handler_reply; 363 363 364 / / B_DEBUG_MESSAGE_PREPARE_HANDOVER364 /* B_DEBUG_MESSAGE_PREPARE_HANDOVER */ 365 365 366 / / no parameters, no reply366 /* no parameters, no reply */ 367 367 368 / / B_DEBUG_START_PROFILER368 /* B_DEBUG_START_PROFILER */ 369 369 370 370 struct debug_profile_function { 371 addr_t base; / / function base address372 size_t size; / / function size371 addr_t base; /* function base address */ 372 size_t size; /* function size */ 373 373 }; 374 374 375 375 typedef struct { 376 port_id reply_port; / / port to send the reply to377 thread_id thread; / / thread to profile378 bigtime_t interval; / / sample interval379 area_id sample_area; / / area into which the sample will be380 / / written381 int32 stack_depth; / / number of return address per hit376 port_id reply_port; /* port to send the reply to */ 377 thread_id thread; /* thread to profile */ 378 bigtime_t interval; /* sample interval */ 379 area_id sample_area; /* area into which the sample will be */ 380 /* written */ 381 int32 stack_depth; /* number of return address per hit */ 382 382 bool variable_stack_depth; 383 / / variable number of samples per hit;384 / / cf. debug_profiler_update383 /* variable number of samples per hit; */ 384 /* cf. debug_profiler_update */ 385 385 } debug_nub_start_profiler; 386 386 387 387 typedef struct { 388 388 status_t error; 389 int32 image_event; / / number of the last image event390 bigtime_t interval; / / actual sample interval (might391 / / differ from the requested one)389 int32 image_event; /* number of the last image event */ 390 bigtime_t interval; /* actual sample interval (might */ 391 /* differ from the requested one) */ 392 392 } debug_nub_start_profiler_reply; 393 393 394 / / B_DEBUG_STOP_PROFILER394 /* B_DEBUG_STOP_PROFILER */ 395 395 396 396 typedef struct { 397 port_id reply_port; / / port to send the reply to398 thread_id thread; / / thread to profile397 port_id reply_port; /* port to send the reply to */ 398 thread_id thread; /* thread to profile */ 399 399 } debug_nub_stop_profiler; 400 400 401 / / reply is debug_profiler_update401 /* reply is debug_profiler_update */ 402 402 403 / / union of all messages structures sent to the debug nub thread403 /* union of all messages structures sent to the debug nub thread */ 404 404 typedef union { 405 405 debug_nub_read_memory read_memory; 406 406 debug_nub_write_memory write_memory; … … 422 422 } debug_nub_message_data; 423 423 424 424 425 / / #pragma mark -426 / / #pragma mark ----- messages to the debugger -----425 /* #pragma mark - */ 426 /* #pragma mark ----- messages to the debugger ----- */ 427 427 428 / / first member of all debugger messages -- not a message by itself428 /* first member of all debugger messages -- not a message by itself */ 429 429 typedef struct { 430 thread_id thread; / / the thread being the event origin431 team_id team; / / the thread's team432 port_id nub_port; / / port to debug nub for this team (only set433 / / for synchronous messages)430 thread_id thread; /* the thread being the event origin */ 431 team_id team; /* the thread's team */ 432 port_id nub_port; /* port to debug nub for this team (only set */ 433 /* for synchronous messages) */ 434 434 } debug_origin; 435 435 436 / / B_DEBUGGER_MESSAGE_THREAD_DEBUGGED436 /* B_DEBUGGER_MESSAGE_THREAD_DEBUGGED */ 437 437 438 438 typedef struct { 439 439 debug_origin origin; 440 440 } debug_thread_debugged; 441 441 442 / / B_DEBUGGER_MESSAGE_DEBUGGER_CALL442 /* B_DEBUGGER_MESSAGE_DEBUGGER_CALL */ 443 443 444 444 typedef struct { 445 445 debug_origin origin; 446 void *message; / / address of the message passed to447 / / debugger()446 void *message; /* address of the message passed to */ 447 /* debugger() */ 448 448 } debug_debugger_call; 449 449 450 / / B_DEBUGGER_MESSAGE_BREAKPOINT_HIT450 /* B_DEBUGGER_MESSAGE_BREAKPOINT_HIT */ 451 451 452 452 typedef struct { 453 453 debug_origin origin; 454 debug_cpu_state cpu_state; / / cpu state455 bool software; / / true, if the is a software breakpoint456 / / (i.e. caused by a respective trap457 / / instruction)454 debug_cpu_state cpu_state; /* cpu state */ 455 bool software; /* true, if the is a software breakpoint */ 456 /* (i.e. caused by a respective trap */ 457 /* instruction) */ 458 458 } debug_breakpoint_hit; 459 459 460 / / B_DEBUGGER_MESSAGE_WATCHPOINT_HIT460 /* B_DEBUGGER_MESSAGE_WATCHPOINT_HIT */ 461 461 462 462 typedef struct { 463 463 debug_origin origin; 464 debug_cpu_state cpu_state; / / cpu state464 debug_cpu_state cpu_state; /* cpu state */ 465 465 } debug_watchpoint_hit; 466 466 467 / / B_DEBUGGER_MESSAGE_SINGLE_STEP467 /* B_DEBUGGER_MESSAGE_SINGLE_STEP */ 468 468 469 469 typedef struct { 470 470 debug_origin origin; 471 debug_cpu_state cpu_state; / / cpu state471 debug_cpu_state cpu_state; /* cpu state */ 472 472 } debug_single_step; 473 473 474 / / B_DEBUGGER_MESSAGE_PRE_SYSCALL474 /* B_DEBUGGER_MESSAGE_PRE_SYSCALL */ 475 475 476 476 typedef struct { 477 477 debug_origin origin; 478 uint32 syscall; / / the syscall number479 uint32 args[16]; / / syscall arguments478 uint32 syscall; /* the syscall number */ 479 uint32 args[16]; /* syscall arguments */ 480 480 } debug_pre_syscall; 481 481 482 / / B_DEBUGGER_MESSAGE_POST_SYSCALL482 /* B_DEBUGGER_MESSAGE_POST_SYSCALL */ 483 483 484 484 typedef struct { 485 485 debug_origin origin; 486 bigtime_t start_time; / / time of syscall start487 bigtime_t end_time; / / time of syscall completion488 uint64 return_value; / / the syscall's return value489 uint32 syscall; / / the syscall number490 uint32 args[16]; / / syscall arguments486 bigtime_t start_time; /* time of syscall start */ 487 bigtime_t end_time; /* time of syscall completion */ 488 uint64 return_value; /* the syscall's return value */ 489 uint32 syscall; /* the syscall number */ 490 uint32 args[16]; /* syscall arguments */ 491 491 } debug_post_syscall; 492 492 493 / / B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED493 /* B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED */ 494 494 495 495 typedef struct { 496 496 debug_origin origin; 497 int signal; / / the signal498 struct sigaction handler; / / the signal handler499 bool deadly; / / true, if handling the signal will kill500 / / the team497 int signal; /* the signal */ 498 struct sigaction handler; /* the signal handler */ 499 bool deadly; /* true, if handling the signal will kill */ 500 /* the team */ 501 501 } debug_signal_received; 502 502 503 / / B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED503 /* B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED */ 504 504 505 505 typedef struct { 506 506 debug_origin origin; 507 debug_exception_type exception; / / the exception508 int signal; / / the signal that will be sent,509 / / when the thread continues510 / / normally507 debug_exception_type exception; /* the exception */ 508 int signal; /* the signal that will be sent, */ 509 /* when the thread continues */ 510 /* normally */ 511 511 } debug_exception_occurred; 512 512 513 / / B_DEBUGGER_MESSAGE_TEAM_CREATED513 /* B_DEBUGGER_MESSAGE_TEAM_CREATED */ 514 514 515 515 typedef struct { 516 516 debug_origin origin; 517 team_id new_team; / / the newly created team517 team_id new_team; /* the newly created team */ 518 518 } debug_team_created; 519 519 520 / / B_DEBUGGER_MESSAGE_TEAM_DELETED520 /* B_DEBUGGER_MESSAGE_TEAM_DELETED */ 521 521 522 522 typedef struct { 523 debug_origin origin; / / thread is < 0, team is the deleted team524 / / (asynchronous message)523 debug_origin origin; /* thread is < 0, team is the deleted team */ 524 /* (asynchronous message) */ 525 525 } debug_team_deleted; 526 526 527 / / B_DEBUGGER_MESSAGE_TEAM_EXEC527 /* B_DEBUGGER_MESSAGE_TEAM_EXEC */ 528 528 529 529 typedef struct { 530 530 debug_origin origin; 531 int32 image_event; / / number of the image event531 int32 image_event; /* number of the image event */ 532 532 } debug_team_exec; 533 533 534 / / B_DEBUGGER_MESSAGE_THREAD_CREATED534 /* B_DEBUGGER_MESSAGE_THREAD_CREATED */ 535 535 536 536 typedef struct { 537 debug_origin origin; / / the thread that created the new thread538 team_id new_thread; / / the newly created thread537 debug_origin origin; /* the thread that created the new thread */ 538 team_id new_thread; /* the newly created thread */ 539 539 } debug_thread_created; 540 540 541 / / B_DEBUGGER_MESSAGE_THREAD_DELETED541 /* B_DEBUGGER_MESSAGE_THREAD_DELETED */ 542 542 543 543 typedef struct { 544 debug_origin origin; / / the deleted thread (asynchronous message)544 debug_origin origin; /* the deleted thread (asynchronous message) */ 545 545 } debug_thread_deleted; 546 546 547 / / B_DEBUGGER_MESSAGE_IMAGE_CREATED547 /* B_DEBUGGER_MESSAGE_IMAGE_CREATED */ 548 548 549 549 typedef struct { 550 550 debug_origin origin; 551 image_info info; / / info for the image552 int32 image_event; / / number of the image event551 image_info info; /* info for the image */ 552 int32 image_event; /* number of the image event */ 553 553 } debug_image_created; 554 554 555 / / B_DEBUGGER_MESSAGE_IMAGE_DELETED555 /* B_DEBUGGER_MESSAGE_IMAGE_DELETED */ 556 556 557 557 typedef struct { 558 558 debug_origin origin; 559 image_info info; / / info for the image560 int32 image_event; / / number of the image event559 image_info info; /* info for the image */ 560 int32 image_event; /* number of the image event */ 561 561 } debug_image_deleted; 562 562 563 / / B_DEBUGGER_MESSAGE_PROFILER_UPDATE563 /* B_DEBUGGER_MESSAGE_PROFILER_UPDATE */ 564 564 565 565 typedef struct { 566 566 debug_origin origin; 567 int32 image_event; / / number of the last image event; all568 / / samples were recorded after this569 / / event and before the next one570 int32 stack_depth; / / number of return addresses per tick571 int32 sample_count; / / number of samples in the buffer572 int32 dropped_ticks; / / number of ticks that had been573 / / dropped, since the buffer was full567 int32 image_event; /* number of the last image event; all */ 568 /* samples were recorded after this */ 569 /* event and before the next one */ 570 int32 stack_depth; /* number of return addresses per tick */ 571 int32 sample_count; /* number of samples in the buffer */ 572 int32 dropped_ticks; /* number of ticks that had been */ 573 /* dropped, since the buffer was full */ 574 574 bool variable_stack_depth; 575 / / the number of samples per hit is576 / / variable, i.e. the format for the577 / / samples of a hit in the buffer is578 / / <n> <sample 1> ... <sample n>579 / / instead of580 / / <sample 1> ... <sample stack_depth>581 bool stopped; / / if true, the thread is no longer582 / / being profiled575 /* the number of samples per hit is */ 576 /* variable, i.e. the format for the */ 577 /* samples of a hit in the buffer is */ 578 /* <n> <sample 1> ... <sample n> */ 579 /* instead of */ 580 /* <sample 1> ... <sample stack_depth> */ 581 bool stopped; /* if true, the thread is no longer */ 582 /* being profiled */ 583 583 } debug_profiler_update; 584 584 585 / / B_DEBUGGER_MESSAGE_HANDED_OVER585 /* B_DEBUGGER_MESSAGE_HANDED_OVER */ 586 586 587 587 typedef struct { 588 debug_origin origin; / / thread is < 0, team is the deleted team589 / / (asynchronous message)590 team_id debugger; / / the new debugger591 port_id debugger_port; / / the port the new debugger uses588 debug_origin origin; /* thread is < 0, team is the deleted team */ 589 /* (asynchronous message) */ 590 team_id debugger; /* the new debugger */ 591 port_id debugger_port; /* the port the new debugger uses */ 592 592 } debug_handed_over; 593 593 594 / / union of all messages structures sent to the debugger594 /* union of all messages structures sent to the debugger */ 595 595 typedef union { 596 596 debug_thread_debugged thread_debugged; 597 597 debug_debugger_call debugger_call; … … 612 612 debug_profiler_update profiler_update; 613 613 debug_handed_over handed_over; 614 614 615 debug_origin origin; / / for convenience (no real message)615 debug_origin origin; /* for convenience (no real message) */ 616 616 } debug_debugger_message_data; 617 617 618 618 … … 623 623 624 624 625 625 #ifdef __cplusplus 626 } / / extern "C"626 } /* extern "C" */ 627 627 #endif 628 628 629 #endif / / _DEBUGGER_H629 #endif /* _DEBUGGER_H */ -
midi/MidiDefs.h
5 5 #include <OS.h> 6 6 #include <Errors.h> 7 7 8 / /------------------------------------------------------------------------------8 /*------------------------------------------------------------------------------ */ 9 9 10 10 /* System time converted to int milliseconds */ 11 11 #define B_NOW ((uint32)(system_time()/1000)) 12 12 13 / /------------------------------------------------------------------------------13 /*------------------------------------------------------------------------------ */ 14 14 15 15 /* Synthesizer things */ 16 16 … … 28 28 } 29 29 synth_mode; 30 30 31 / /------------------------------------------------------------------------------31 /*------------------------------------------------------------------------------ */ 32 32 33 33 /* Need to move these into Errors.h */ 34 34 … … 42 42 B_TOO_MANY_SONGS_PLAYING 43 43 }; 44 44 45 / /------------------------------------------------------------------------------45 /*------------------------------------------------------------------------------ */ 46 46 47 47 #ifndef uchar 48 48 typedef unsigned char uchar; … … 115 115 116 116 const uchar B_TEMPO_CHANGE = 0x51; 117 117 118 #endif / / _MIDI_CONSTANTS_118 #endif /* _MIDI_CONSTANTS_ */ 119 119 120 / /------------------------------------------------------------------------------120 /*------------------------------------------------------------------------------ */ 121 121 122 122 typedef enum midi_axe 123 123 { … … 299 299 } 300 300 midi_axe; 301 301 302 #endif / / _MIDI_DEFS_H302 #endif /* _MIDI_DEFS_H */ -
NetKit.h
13 13 #include <NetBuffer.h> 14 14 #include <NetEndpoint.h> 15 15 16 #endif / / _NET_KIT_H_16 #endif /* _NET_KIT_H_ */ -
add-ons/graphics/Accelerant.h
122 122 uint16 v_blank_max; 123 123 } display_timing_constraints; 124 124 125 / / TODO: experimental API125 /* TODO: experimental API */ 126 126 typedef struct { 127 127 uint32 version; 128 128 char vendor[128]; … … 135 135 } produced; 136 136 float width; 137 137 float height; 138 uint32 min_horizontal_frequency; / / in kHz138 uint32 min_horizontal_frequency; /* in kHz */ 139 139 uint32 max_horizontal_frequency; 140 uint32 min_vertical_frequency; / / in Hz140 uint32 min_vertical_frequency; /* in Hz */ 141 141 uint32 max_vertical_frequency; 142 uint32 max_pixel_clock; / / in kHz142 uint32 max_pixel_clock; /* in kHz */ 143 143 } monitor_info; 144 144 145 145 enum { /* mode flags */ -
translation/TranslationDefs.h
54 54 char MIME[251]; 55 55 }; 56 56 57 / / BEGIN: Haiku R1 Extensions57 /* BEGIN: Haiku R1 Extensions */ 58 58 59 59 #define B_TRANSLATION_MAKE_VERSION(major,minor,revision) ((major << 8) | ((minor << 4) & 0xf0) | (revision & 0x0f)) 60 60 #define B_TRANSLATION_MAJOR_VERSION(v) (v >> 8) 61 61 #define B_TRANSLATION_MINOR_VERSION(v) ((v >> 4) & 0xf) 62 62 #define B_TRANSLATION_REVISION_VERSION(v) (v & 0xf) 63 63 64 / / END: Haiku R1 Extensions64 /* END: Haiku R1 Extensions */ 65 65 66 66 #endif /* _TRANSLATION_DEFS_H */ -
device/scsi_bus_raw_driver.h
18 18 19 19 #include <Drivers.h> 20 20 21 / / we start with +300 to not collide with any other SCSI opcode defined22 / / in scsiprobe_driver.h or scsi.h;23 / / all ioctl calls return the subsystem status (see SCSI.h)21 /* we start with +300 to not collide with any other SCSI opcode defined */ 22 /* in scsiprobe_driver.h or scsi.h; */ 23 /* all ioctl calls return the subsystem status (see SCSI.h) */ 24 24 enum { 25 25 B_SCSI_BUS_RAW_RESET = B_DEVICE_OP_CODES_END + 300, 26 26 B_SCSI_BUS_RAW_PATH_INQUIRY -
midi2/Midi2Defs.h
71 71 const uchar B_MONO_MODE_ON = 0x7e; 72 72 const uchar B_POLY_MODE_ON = 0x7f; 73 73 74 #endif / / _MIDI_CONSTANTS_74 #endif /* _MIDI_CONSTANTS_ */ 75 75 76 #endif / / _MIDI2_DEFS_H76 #endif /* _MIDI2_DEFS_H */ -
storage/StorageDefs.h
11 11 #include <limits.h> 12 12 13 13 14 / / Limits14 /* Limits */ 15 15 #define B_DEV_NAME_LENGTH 128 16 16 #define B_FILE_NAME_LENGTH NAME_MAX 17 17 #define B_PATH_NAME_LENGTH MAXPATHLEN … … 19 19 #define B_MIME_TYPE_LENGTH (B_ATTR_NAME_LENGTH - 15) 20 20 #define B_MAX_SYMLINKS SYMLOOP_MAX 21 21 22 / / Open Modes23 #define B_READ_ONLY O_RDONLY / / read only24 #define B_WRITE_ONLY O_WRONLY / / write only25 #define B_READ_WRITE O_RDWR / / read and write22 /* Open Modes */ 23 #define B_READ_ONLY O_RDONLY /* read only */ 24 #define B_WRITE_ONLY O_WRONLY /* write only */ 25 #define B_READ_WRITE O_RDWR /* read and write */ 26 26 27 #define B_FAIL_IF_EXISTS O_EXCL / / exclusive create28 #define B_CREATE_FILE O_CREAT / / create the file29 #define B_ERASE_FILE O_TRUNC / / erase the file's data30 #define B_OPEN_AT_END O_APPEND / / point to the end of the data27 #define B_FAIL_IF_EXISTS O_EXCL /* exclusive create */ 28 #define B_CREATE_FILE O_CREAT /* create the file */ 29 #define B_ERASE_FILE O_TRUNC /* erase the file's data */ 30 #define B_OPEN_AT_END O_APPEND /* point to the end of the data */ 31 31 32 / / Node Flavors32 /* Node Flavors */ 33 33 enum node_flavor { 34 34 B_FILE_NODE = 0x01, 35 35 B_SYMLINK_NODE = 0x02, … … 37 37 B_ANY_NODE = 0x07 38 38 }; 39 39 40 #endif / / _DEF_STORAGE_H40 #endif /* _DEF_STORAGE_H */ -
storage/DiskDeviceDefs.h
13 13 typedef int32 disk_system_id; 14 14 typedef int32 disk_job_id; 15 15 16 / / partition flags16 /* partition flags */ 17 17 enum { 18 18 B_PARTITION_IS_DEVICE = 0x01, 19 19 B_PARTITION_FILE_SYSTEM = 0x02, 20 20 B_PARTITION_PARTITIONING_SYSTEM = 0x04, 21 21 B_PARTITION_READ_ONLY = 0x08, 22 B_PARTITION_MOUNTED = 0x10, / / needed?22 B_PARTITION_MOUNTED = 0x10, /* needed? */ 23 23 B_PARTITION_BUSY = 0x20, 24 24 }; 25 25 26 / / partition statuses26 /* partition statuses */ 27 27 enum { 28 28 B_PARTITION_VALID, 29 29 B_PARTITION_CORRUPT, 30 30 B_PARTITION_UNRECOGNIZED, 31 B_PARTITION_UNINITIALIZED, / / Only when uninitialized manually.32 / / When not recognized while scanning it's33 / / B_PARTITION_UNRECOGNIZED.31 B_PARTITION_UNINITIALIZED, /* Only when uninitialized manually. */ 32 /* When not recognized while scanning it's */ 33 /* B_PARTITION_UNRECOGNIZED. */ 34 34 }; 35 35 36 / / partition change flags36 /* partition change flags */ 37 37 enum { 38 38 B_PARTITION_CHANGED_OFFSET = 0x000001, 39 39 B_PARTITION_CHANGED_SIZE = 0x000002, … … 56 56 B_PARTITION_CHANGED_INITIALIZATION = 0x040000, 57 57 }; 58 58 59 / / disk device flags59 /* disk device flags */ 60 60 enum { 61 61 B_DISK_DEVICE_REMOVABLE = 0x01, 62 62 B_DISK_DEVICE_HAS_MEDIA = 0x02, … … 65 65 B_DISK_DEVICE_IS_FILE = 0x10, 66 66 }; 67 67 68 / / disk system flags68 /* disk system flags */ 69 69 enum { 70 70 B_DISK_SYSTEM_IS_FILE_SYSTEM = 0x000001, 71 71 72 / / flags common for both file and partitioning systems72 /* flags common for both file and partitioning systems */ 73 73 B_DISK_SYSTEM_SUPPORTS_CHECKING = 0x000002, 74 74 B_DISK_SYSTEM_SUPPORTS_REPAIRING = 0x000004, 75 75 B_DISK_SYSTEM_SUPPORTS_RESIZING = 0x000008, … … 79 79 B_DISK_SYSTEM_SUPPORTS_INITIALIZING = 0x000080, 80 80 B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME = 0x000100, 81 81 82 / / file system specific flags82 /* file system specific flags */ 83 83 B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING = 0x001000, 84 84 B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING_WHILE_MOUNTED = 0x002000, 85 85 B_DISK_SYSTEM_SUPPORTS_CHECKING_WHILE_MOUNTED = 0x004000, … … 90 90 B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED = 0x080000, 91 91 B_DISK_SYSTEM_SUPPORTS_WRITING = 0x100000, 92 92 93 / / partitioning system specific flags93 /* partitioning system specific flags */ 94 94 B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD = 0x001000, 95 95 B_DISK_SYSTEM_SUPPORTS_MOVING_CHILD = 0x002000, 96 96 B_DISK_SYSTEM_SUPPORTS_SETTING_NAME = 0x004000, … … 101 101 B_DISK_SYSTEM_SUPPORTS_NAME = 0x080000, 102 102 }; 103 103 104 / / disk device job types104 /* disk device job types */ 105 105 enum { 106 106 B_DISK_DEVICE_JOB_BAD_TYPE, 107 107 B_DISK_DEVICE_JOB_DEFRAGMENT, … … 120 120 B_DISK_DEVICE_JOB_SCAN, 121 121 }; 122 122 123 / / disk device job statuses123 /* disk device job statuses */ 124 124 enum { 125 125 B_DISK_DEVICE_JOB_UNINITIALIZED, 126 126 B_DISK_DEVICE_JOB_SCHEDULED, … … 130 130 B_DISK_DEVICE_JOB_CANCELED, 131 131 }; 132 132 133 / / disk device job progress info133 /* disk device job progress info */ 134 134 typedef struct disk_device_job_progress_info { 135 135 uint32 status; 136 136 uint32 interrupt_properties; … … 140 140 char current_task_description[256]; 141 141 } disk_device_job_progress_info; 142 142 143 / / disk device job interrupt properties143 /* disk device job interrupt properties */ 144 144 enum { 145 145 B_DISK_DEVICE_JOB_CAN_CANCEL = 0x01, 146 146 B_DISK_DEVICE_JOB_STOP_ON_CANCEL = 0x02, … … 148 148 B_DISK_DEVICE_JOB_CAN_PAUSE = 0x08, 149 149 }; 150 150 151 / / string length constants, all of which include the NULL terminator151 /* string length constants, all of which include the NULL terminator */ 152 152 #define B_DISK_DEVICE_TYPE_LENGTH B_FILE_NAME_LENGTH 153 153 #define B_DISK_DEVICE_NAME_LENGTH B_FILE_NAME_LENGTH 154 154 #define B_DISK_SYSTEM_NAME_LENGTH B_PATH_NAME_LENGTH 155 155 156 / / max size of parameter string buffers, including NULL terminator156 /* max size of parameter string buffers, including NULL terminator */ 157 157 #define B_DISK_DEVICE_MAX_PARAMETER_SIZE (32 * 1024) 158 158 159 #endif / / _DISK_DEVICE_DEFS_H159 #endif /* _DISK_DEVICE_DEFS_H */ -
bluetooth/L2CAP/btL2CAP.h
16 16 }; 17 17 18 18 19 #endif / / _BTL2CAP_H_20 No newline at end of file 19 #endif /* _BTL2CAP_H_ */ 20 No newline at end of file -
bluetooth/HCI/btHCI_sco.h
14 14 uint8 slen; 15 15 } __attribute__((packed)); 16 16 17 #endif / / _BTHCI_SCO_H_17 #endif /* _BTHCI_SCO_H_ */ -
bluetooth/HCI/btHCI_module.h
32 32 } bt_hci_module_info ; 33 33 34 34 35 #endif / / _BTHCI_MODULE_H_35 #endif /* _BTHCI_MODULE_H_ */ -
bluetooth/HCI/btHCI_transport.h
93 93 #define BLUETOOTH_CONNECTION_PORT "bluetooth connection port" 94 94 #define BLUETOOTH_CONNECTION_SCHED_PORT "bluetooth con sched port" 95 95 96 #endif / / _BTHCI_TRANSPORT_H_96 #endif /* _BTHCI_TRANSPORT_H_ */ -
bluetooth/HCI/btHCI_acl.h
33 33 #define HCI_ACL_BROADCAST_PICONET 0x2 /* both directions */ 34 34 /* 11 - reserved for future use */ 35 35 36 #endif / / _BTHCI_ACL_H_36 #endif /* _BTHCI_ACL_H_ */ -
bluetooth/bluetooth_error.h
68 68 #define HOST_BUSY_PAIRING 0x38 69 69 70 70 71 #endif / / _BLUETOOTH_ERROR_H71 #endif /* _BLUETOOTH_ERROR_H */ -
bluetooth/bluetooth_util.h
53 53 } 54 54 55 55 56 #endif / / _BLUETOOTH_UTIL_H56 #endif /* _BLUETOOTH_UTIL_H */ -
bluetooth/bluetooth.h
52 52 #define BLUETOOTH_PROTO_MAX 256 53 53 54 54 55 #endif / / _BLUETOOTH_H55 #endif /* _BLUETOOTH_H */ -
game/GameSoundDefs.h
1 / /------------------------------------------------------------------------------2 / / Copyright (c) 2001-2002, OpenBeOS3 / /4 / / Permission is hereby granted, free of charge, to any person obtaining a5 / / copy of this software and associated documentation files (the "Software"),6 / / to deal in the Software without restriction, including without limitation7 / / the rights to use, copy, modify, merge, publish, distribute, sublicense,8 / / and/or sell copies of the Software, and to permit persons to whom the9 / / Software is furnished to do so, subject to the following conditions:10 / /11 / / The above copyright notice and this permission notice shall be included in12 / / all copies or substantial portions of the Software.13 / /14 / / THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15 / / IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16 / / FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE17 / / AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18 / / LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING19 / / FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER20 / / DEALINGS IN THE SOFTWARE.21 / /22 / / File Name: GameSound.cpp23 / / Author: Christopher ML Zumwalt May (cdzumwalt@dsl-only.net)24 / / Description: Declarations for game sounds25 / /------------------------------------------------------------------------------1 /*------------------------------------------------------------------------------ */ 2 /* Copyright (c) 2001-2002, OpenBeOS */ 3 /* */ 4 /* Permission is hereby granted, free of charge, to any person obtaining a */ 5 /* copy of this software and associated documentation files (the "Software"), */ 6 /* to deal in the Software without restriction, including without limitation */ 7 /* the rights to use, copy, modify, merge, publish, distribute, sublicense, */ 8 /* and/or sell copies of the Software, and to permit persons to whom the */ 9 /* Software is furnished to do so, subject to the following conditions: */ 10 /* */ 11 /* The above copyright notice and this permission notice shall be included in */ 12 /* all copies or substantial portions of the Software. */ 13 /* */ 14 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR */ 15 /* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, */ 16 /* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE */ 17 /* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER */ 18 /* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING */ 19 /* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER */ 20 /* DEALINGS IN THE SOFTWARE. */ 21 /* */ 22 /* File Name: GameSound.cpp */ 23 /* Author: Christopher ML Zumwalt May (cdzumwalt@dsl-only.net) */ 24 /* Description: Declarations for game sounds */ 25 /*------------------------------------------------------------------------------ */ 26 26 27 27 #if !defined(_GAME_SOUND_DEFS_H) 28 28 #define _GAME_SOUND_DEFS_H … … 34 34 #define B_GS_CUR_API_VERSION B_BEOS_VERSION 35 35 #define B_GS_MIN_API_VERSION 0x100 36 36 37 / / invalid sound handle37 /* invalid sound handle */ 38 38 #define B_GS_INVALID_SOUND ((gs_id)-1) 39 39 40 / / gs_id for the main mix buffer40 /* gs_id for the main mix buffer */ 41 41 #define B_GS_MAIN_SOUND ((gs_id)-2) 42 42 43 43 44 enum / /fixme renumber to real error messages44 enum /*fixme renumber to real error messages */ 45 45 { 46 46 B_GS_BAD_HANDLE = -99999, 47 47 B_GS_NO_SOUNDS, … … 67 67 }; 68 68 69 69 70 / /70 /* */ 71 71 enum gs_attributes 72 72 { 73 B_GS_NO_ATTRIBUTE = 0, / / when there is no attribute74 B_GS_MAIN_GAIN = 1, / / 0 == 0 dB, -6.0 == -6 dB (gs_id ignored)75 B_GS_CD_THROUGH_GAIN, / / 0 == 0 dB, -12.0 == -12 dB (gs_id ignored)76 / / but which CD?77 B_GS_GAIN = 128, / / 0 == 0 dB, -1.0 == -1 dB, +10.0 == +10 dB78 B_GS_PAN, / / 0 == middle, -1.0 == left, +1.0 == right79 B_GS_SAMPLING_RATE, / / 44100.0 == 44.1 kHz80 B_GS_LOOPING, / / 0 == no73 B_GS_NO_ATTRIBUTE = 0, /* when there is no attribute */ 74 B_GS_MAIN_GAIN = 1, /* 0 == 0 dB, -6.0 == -6 dB (gs_id ignored) */ 75 B_GS_CD_THROUGH_GAIN, /* 0 == 0 dB, -12.0 == -12 dB (gs_id ignored) */ 76 /* but which CD? */ 77 B_GS_GAIN = 128, /* 0 == 0 dB, -1.0 == -1 dB, +10.0 == +10 dB */ 78 B_GS_PAN, /* 0 == middle, -1.0 == left, +1.0 == right */ 79 B_GS_SAMPLING_RATE, /* 44100.0 == 44.1 kHz */ 80 B_GS_LOOPING, /* 0 == no */ 81 81 B_GS_FIRST_PRIVATE_ATTRIBUTE = 90000, 82 82 B_GS_FIRST_USER_ATTRIBUTE = 100000 83 83 }; 84 84 struct gs_attribute 85 85 { 86 int32 attribute; / / which attribute87 bigtime_t duration; / / how long of time to ramp over for the change88 float value; / / where the value stops changing89 uint32 flags; / / whatever flags are for the attribute86 int32 attribute; /* which attribute */ 87 bigtime_t duration; /* how long of time to ramp over for the change */ 88 float value; /* where the value stops changing */ 89 uint32 flags; /* whatever flags are for the attribute */ 90 90 }; 91 91 struct gs_attribute_info 92 92 { … … 97 97 }; 98 98 99 99 100 #endif / / _GAME_SOUND_DEFS_H100 #endif /* _GAME_SOUND_DEFS_H */ -
be_apps/ServicesDaemon/ServicesDaemon.h
3 3 4 4 #define B_SERVICES_DAEMON_SIGNATURE "application/x-vnd.Haiku-ServicesDaemon" 5 5 6 / / Send this message to the daemon if you would like to have your program7 / / restarted. The message is expected to have an attached string containing8 / / the signature of your app. Once sent to the daemon, it will wait until9 / / your app quits before relaunching it.6 /* Send this message to the daemon if you would like to have your program */ 7 /* restarted. The message is expected to have an attached string containing */ 8 /* the signature of your app. Once sent to the daemon, it will wait until */ 9 /* your app quits before relaunching it. */ 10 10 #define B_SERVICES_DAEMON_RESTART 'SDRS' 11 11 12 12 #endif -
be_apps/Deskbar/Deskbar.h
1 1 #ifndef _DESKBAR_H 2 / / I don't know why this file exists in addition to the one we include3 / / below, but who cares... (originally, in R5, both files exist and are4 / / identical).2 /* I don't know why this file exists in addition to the one we include */ 3 /* below, but who cares... (originally, in R5, both files exist and are */ 4 /* identical). */ 5 5 # include <interface/Deskbar.h> 6 6 #endif -
be_apps/Tracker/Background.h
43 43 /*----------------------------------------------------------------*/ 44 44 /*----- Tracker background BMessage entries --------------------*/ 45 45 46 #define B_BACKGROUND_IMAGE "be:bgndimginfopath" / / string path47 #define B_BACKGROUND_MODE "be:bgndimginfomode" / / int32, the enum below48 #define B_BACKGROUND_ORIGIN "be:bgndimginfooffset" / / BPoint49 #define B_BACKGROUND_ERASE_TEXT "be:bgndimginfoerasetext" / / bool50 #define B_BACKGROUND_WORKSPACES "be:bgndimginfoworkspaces" / / uint3246 #define B_BACKGROUND_IMAGE "be:bgndimginfopath" /* string path */ 47 #define B_BACKGROUND_MODE "be:bgndimginfomode" /* int32, the enum below */ 48 #define B_BACKGROUND_ORIGIN "be:bgndimginfooffset" /* BPoint */ 49 #define B_BACKGROUND_ERASE_TEXT "be:bgndimginfoerasetext" /* bool */ 50 #define B_BACKGROUND_WORKSPACES "be:bgndimginfoworkspaces" /* uint32 */ 51 51 52 52 /*----------------------------------------------------------------*/ 53 53 /*----- Background mode values ---------------------------------*/ 54 54 55 55 enum { 56 56 B_BACKGROUND_MODE_USE_ORIGIN, 57 B_BACKGROUND_MODE_CENTERED, / / only works on Desktop58 B_BACKGROUND_MODE_SCALED, / / only works on Desktop57 B_BACKGROUND_MODE_CENTERED, /* only works on Desktop */ 58 B_BACKGROUND_MODE_SCALED, /* only works on Desktop */ 59 59 B_BACKGROUND_MODE_TILED 60 60 }; 61 61 62 62 /*----------------------------------------------------------------*/ 63 63 /*----------------------------------------------------------------*/ 64 64 65 const int32 B_RESTORE_BACKGROUND_IMAGE = 'Tbgr'; / / force a Tracker window to66 / / use a new background image65 const int32 B_RESTORE_BACKGROUND_IMAGE = 'Tbgr'; /* force a Tracker window to */ 66 /* use a new background image */ 67 67 68 68 #endif /* _TRACKER_BACKGROUND_H */ -
arch/ppc/arch_debugger.h
9 9 uint32 dummy; 10 10 } __attribute__((aligned(8))); 11 11 12 #endif / / _ARCH_PPC_DEBUGGER_H12 #endif /* _ARCH_PPC_DEBUGGER_H */ -
arch/m68k/arch_debugger.h
28 28 uint32 dummy; 29 29 } __attribute__((aligned(8))); 30 30 31 #endif / / _ARCH_M68K_DEBUGGER_H31 #endif /* _ARCH_M68K_DEBUGGER_H */ -
arch/x86/arch_debugger.h
29 29 uint32 user_ss; 30 30 } __attribute__((aligned(8))); 31 31 32 #endif / / _ARCH_X86_DEBUGGER_H32 #endif /* _ARCH_X86_DEBUGGER_H */ -
mail/mail_encoding.h
12 12 13 13 #define B_MAIL_NULL_CONVERSION ((uint32) -1) 14 14 #define B_MAIL_UTF8_CONVERSION ((uint32) -2) 15 / / For specifying the UTF-8 character set when converting to/from UTF-8.15 /* For specifying the UTF-8 character set when converting to/from UTF-8. */ 16 16 #define B_MAIL_US_ASCII_CONVERSION ((uint32) -3) 17 / / Plain 7 bit ASCII character set. A subset of UTF-8, but some mail software18 / / specifies it so we need to recognize it.17 /* Plain 7 bit ASCII character set. A subset of UTF-8, but some mail software */ 18 /* specifies it so we need to recognize it. */ 19 19 20 20 #define BASE64_LINELENGTH 76 21 21 … … 24 24 quoted_printable = 'q', 25 25 seven_bit = '7', 26 26 eight_bit = '8', 27 uuencode = 'u', / / Invalid to encode something using uuencode.28 null_encoding = 0, / / For not changing existing settings.27 uuencode = 'u', /* Invalid to encode something using uuencode. */ 28 null_encoding = 0, /* For not changing existing settings. */ 29 29 no_encoding = -1 30 30 } mail_encoding; 31 31 … … 35 35 36 36 ssize_t encode(mail_encoding encoding, char *out, const char *in, 37 37 off_t length, int headerMode); 38 / / boolean headerMode only matters for quoted_printable and base64.38 /* boolean headerMode only matters for quoted_printable and base64. */ 39 39 ssize_t decode(mail_encoding encoding, char *out, const char *in, off_t length, 40 40 int underscore_is_space); 41 / / the value of underscore_is_space only matters for quoted_printable.41 /* the value of underscore_is_space only matters for quoted_printable. */ 42 42 43 43 ssize_t max_encoded_length(mail_encoding encoding, off_t cur_length); 44 44 mail_encoding encoding_for_cte(const char *content_transfer_encoding); … … 48 48 49 49 ssize_t encode_qp(char *out, const char *in, off_t length, int headerMode); 50 50 ssize_t decode_qp(char *out, const char *in, off_t length, int underscore_is_space); 51 / /---underscore_is_space should be 1 if and only if you are decoding a header field51 /*---underscore_is_space should be 1 if and only if you are decoding a header field */ 52 52 53 53 ssize_t uu_decode(char *out, const char *in, off_t length); 54 54 -
interface/UnicodeBlockObjects.h
1 / /------------------------------------------------------------------------------2 / / Copyright (c) 2001-2002, OpenBeOS3 / /4 / / Permission is hereby granted, free of charge, to any person obtaining a5 / / copy of this software and associated documentation files (the "Software"),6 / / to deal in the Software without restriction, including without limitation7 / / the rights to use, copy, modify, merge, publish, distribute, sublicense,8 / / and/or sell copies of the Software, and to permit persons to whom the9 / / Software is furnished to do so, subject to the following conditions:10 / /11 / / The above copyright notice and this permission notice shall be included in12 / / all copies or substantial portions of the Software.13 / /14 / / THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15 / / IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16 / / FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE17 / / AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18 / / LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING19 / / FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER20 / / DEALINGS IN THE SOFTWARE.21 / /22 / / File Name: UnicodeBlockObjects.h23 / / Author: Erik Jaesler (erik@cgsoftware.com)24 / / Description: Predefined unicode_block objects25 / /------------------------------------------------------------------------------1 /*------------------------------------------------------------------------------ */ 2 /* Copyright (c) 2001-2002, OpenBeOS */ 3 /* */ 4 /* Permission is hereby granted, free of charge, to any person obtaining a */ 5 /* copy of this software and associated documentation files (the "Software"), */ 6 /* to deal in the Software without restriction, including without limitation */ 7 /* the rights to use, copy, modify, merge, publish, distribute, sublicense, */ 8 /* and/or sell copies of the Software, and to permit persons to whom the */ 9 /* Software is furnished to do so, subject to the following conditions: */ 10 /* */ 11 /* The above copyright notice and this permission notice shall be included in */ 12 /* all copies or substantial portions of the Software. */ 13 /* */ 14 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR */ 15 /* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, */ 16 /* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE */ 17 /* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER */ 18 /* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING */ 19 /* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER */ 20 /* DEALINGS IN THE SOFTWARE. */ 21 /* */ 22 /* File Name: UnicodeBlockObjects.h */ 23 /* Author: Erik Jaesler (erik@cgsoftware.com) */ 24 /* Description: Predefined unicode_block objects */ 25 /*------------------------------------------------------------------------------ */ 26 26 27 27 #ifndef _UNICODEBLOCKOBJECTS_H 28 28 #define _UNICODEBLOCKOBJECTS_H 29 29 30 / / Standard Includes -----------------------------------------------------------30 /* Standard Includes ----------------------------------------------------------- */ 31 31 32 / / System Includes -------------------------------------------------------------32 /* System Includes ------------------------------------------------------------- */ 33 33 #include <Font.h> 34 34 35 / / Project Includes ------------------------------------------------------------35 /* Project Includes ------------------------------------------------------------ */ 36 36 37 / / Local Includes --------------------------------------------------------------37 /* Local Includes -------------------------------------------------------------- */ 38 38 39 / / Local Defines ---------------------------------------------------------------39 /* Local Defines --------------------------------------------------------------- */ 40 40 41 / / Globals ---------------------------------------------------------------------41 /* Globals --------------------------------------------------------------------- */ 42 42 43 43 44 / / Unicode block list with their unicode encoding range44 /* Unicode block list with their unicode encoding range */ 45 45 const unicode_block B_BASIC_LATIN_BLOCK( /* 0000 - 007F */ 0x0000000000000000LL, 0x0000000000000001LL); 46 46 const unicode_block B_LATIN1_SUPPLEMENT_BLOCK( /* 0080 - 00FF */ 0x0000000000000000LL, 0x0000000000000002LL); 47 47 const unicode_block B_LATIN_EXTENDED_A_BLOCK( /* 0100 - 017F */ 0x0000000000000000LL, 0x0000000000000004LL); … … 114 114 const unicode_block B_SPECIALS_BLOCK( /* FEFF and FFF0 - FFFF */ 0x0000000000000020LL, 0x0000000000000000LL); 115 115 const unicode_block B_TIBETAN_BLOCK( /* 0F00 - 0FBF */ 0x0000000000000040LL, 0x0000000000000000LL); 116 116 117 #endif / / _UNICODEBLOCKOBJECTS_H117 #endif /* _UNICODEBLOCKOBJECTS_H */ 118 118 119 119 /* 120 120 * $Log $ -
interface/GraphicsDefs.h
10 10 #include <SupportDefs.h> 11 11 12 12 13 / / Pattern13 /* Pattern */ 14 14 15 15 typedef struct pattern { 16 16 uint8 data[8]; … … 30 30 return !(a == b); 31 31 } 32 32 33 #endif / / __cplusplus33 #endif /* __cplusplus */ 34 34 35 35 extern const pattern B_SOLID_HIGH; 36 36 extern const pattern B_MIXED_COLORS; 37 37 extern const pattern B_SOLID_LOW; 38 38 39 39 40 / / rgb_color40 /* rgb_color */ 41 41 42 42 typedef struct rgb_color { 43 43 uint8 red; … … 46 46 uint8 alpha; 47 47 48 48 #if defined(__cplusplus) 49 / / some convenient additions49 /* some convenient additions */ 50 50 51 51 inline rgb_color& 52 52 set_to(uint8 r, uint8 g, uint8 b, uint8 a = 255) … … 98 98 extern const rgb_color B_TRANSPARENT_32_BIT; 99 99 100 100 101 / / color map101 /* color map */ 102 102 103 103 typedef struct color_map { 104 104 int32 id; … … 108 108 } color_map; 109 109 110 110 111 / / overlay111 /* overlay */ 112 112 113 113 typedef struct overlay_rect_limits { 114 114 uint16 horizontal_alignment; … … 133 133 } overlay_restrictions; 134 134 135 135 136 / / screen ID136 /* screen ID */ 137 137 138 138 struct screen_id { int32 id; }; 139 139 140 140 extern const struct screen_id B_MAIN_SCREEN_ID; 141 141 142 142 143 / / color spaces143 /* color spaces */ 144 144 145 145 typedef enum { 146 146 B_NO_COLOR_SPACE = 0x0000, 147 147 148 / / linear color space (little endian)149 B_RGB32 = 0x0008, / / BGR-150 B_RGBA32 = 0x2008, / / BGRA151 B_RGB24 = 0x0003, / / BGR148 /* linear color space (little endian) */ 149 B_RGB32 = 0x0008, /* BGR- */ 150 B_RGBA32 = 0x2008, /* BGRA */ 151 B_RGB24 = 0x0003, /* BGR */ 152 152 B_RGB16 = 0x0005, 153 153 B_RGB15 = 0x0010, 154 154 B_RGBA15 = 0x2010, … … 156 156 B_GRAY8 = 0x0002, 157 157 B_GRAY1 = 0x0001, 158 158 159 / / big endian version160 B_RGB32_BIG = 0x1008, / / -RGB161 B_RGBA32_BIG = 0x3008, / / ARGB162 B_RGB24_BIG = 0x1003, / / RGB159 /* big endian version */ 160 B_RGB32_BIG = 0x1008, /* -RGB */ 161 B_RGBA32_BIG = 0x3008, /* ARGB */ 162 B_RGB24_BIG = 0x1003, /* RGB */ 163 163 B_RGB16_BIG = 0x1005, 164 164 B_RGB15_BIG = 0x1010, 165 165 B_RGBA15_BIG = 0x3010, 166 166 167 / / explicit little-endian for completeness167 /* explicit little-endian for completeness */ 168 168 B_RGB32_LITTLE = B_RGB32, 169 169 B_RGBA32_LITTLE = B_RGBA32, 170 170 B_RGB24_LITTLE = B_RGB24, … … 172 172 B_RGB15_LITTLE = B_RGB15, 173 173 B_RGBA15_LITTLE = B_RGBA15, 174 174 175 / / non linear color space -- incidently, all with 8 bits per value176 / / Note, BBitmap and BView do not support all of these!175 /* non linear color space -- incidently, all with 8 bits per value */ 176 /* Note, BBitmap and BView do not support all of these! */ 177 177 178 / / loss/saturation points are Y 16-235 (absolute), Cb/Cr 16-240 (center 128)178 /* loss/saturation points are Y 16-235 (absolute), Cb/Cr 16-240 (center 128) */ 179 179 180 B_YCbCr422 = 0x4000, / / Y0 Cb0 Y1 Cr0 Y2...181 / / Cb2 Y3 Cr2...182 B_YCbCr411 = 0x4001, / / Cb0 Y0 Cr0 Y1 Cb4...183 / / Y2 Cr4 Y3 Y4 Y5...184 / / Y6 Y7...185 B_YCbCr444 = 0x4003, / / Y Cb Cr186 B_YCbCr420 = 0x4004, / / Non-interlaced only187 / / on even scan lines: Cb0 Y0 Y1 Cb2 Y2 Y3188 / / on odd scan lines: Cr0 Y0 Y1 Cr2 Y2 Y3180 B_YCbCr422 = 0x4000, /* Y0 Cb0 Y1 Cr0 Y2... */ 181 /* Cb2 Y3 Cr2... */ 182 B_YCbCr411 = 0x4001, /* Cb0 Y0 Cr0 Y1 Cb4... */ 183 /* Y2 Cr4 Y3 Y4 Y5... */ 184 /* Y6 Y7... */ 185 B_YCbCr444 = 0x4003, /* Y Cb Cr */ 186 B_YCbCr420 = 0x4004, /* Non-interlaced only */ 187 /* on even scan lines: Cb0 Y0 Y1 Cb2 Y2 Y3 */ 188 /* on odd scan lines: Cr0 Y0 Y1 Cr2 Y2 Y3 */ 189 189 190 / / Extrema points are:191 / / Y 0 - 207 (absolute)192 / / U -91 - 91 (offset 128)193 / / V -127 - 127 (offset 128)190 /* Extrema points are: */ 191 /* Y 0 - 207 (absolute) */ 192 /* U -91 - 91 (offset 128) */ 193 /* V -127 - 127 (offset 128) */ 194 194 195 / / Note that YUV byte order is different from YCbCr; use YCbCr, not YUV,196 / / when that's what you mean!197 B_YUV422 = 0x4020, / / U0 Y0 V0 Y1...198 / / U2 Y2 V2 Y3...199 B_YUV411 = 0x4021, / / U0 Y0 Y1 V0 Y2 Y3...200 / / U4 Y4 Y5 V4 Y6 Y7...201 B_YUV444 = 0x4023, / / U0 Y0 V0 U1 Y1 V1202 B_YUV420 = 0x4024, / / Non-interlaced only203 / / on even scan lines: U0 Y0 Y1 U2 Y2 Y3204 / / on odd scan lines: V0 Y0 Y1 V2 Y2 Y3195 /* Note that YUV byte order is different from YCbCr; use YCbCr, not YUV, */ 196 /* when that's what you mean! */ 197 B_YUV422 = 0x4020, /* U0 Y0 V0 Y1... */ 198 /* U2 Y2 V2 Y3... */ 199 B_YUV411 = 0x4021, /* U0 Y0 Y1 V0 Y2 Y3... */ 200 /* U4 Y4 Y5 V4 Y6 Y7... */ 201 B_YUV444 = 0x4023, /* U0 Y0 V0 U1 Y1 V1 */ 202 B_YUV420 = 0x4024, /* Non-interlaced only */ 203 /* on even scan lines: U0 Y0 Y1 U2 Y2 Y3 */ 204 /* on odd scan lines: V0 Y0 Y1 V2 Y2 Y3 */ 205 205 B_YUV9 = 0x402C, 206 206 B_YUV12 = 0x402D, 207 207 208 B_UVL24 = 0x4030, / / UVL209 B_UVL32 = 0x4031, / / UVL-210 B_UVLA32 = 0x6031, / / UVLA208 B_UVL24 = 0x4030, /* UVL */ 209 B_UVL32 = 0x4031, /* UVL- */ 210 B_UVLA32 = 0x6031, /* UVLA */ 211 211 212 / / L lightness, a/b color-opponent dimensions213 B_LAB24 = 0x4032, / / Lab214 B_LAB32 = 0x4033, / / Lab-215 B_LABA32 = 0x6033, / / LabA212 /* L lightness, a/b color-opponent dimensions */ 213 B_LAB24 = 0x4032, /* Lab */ 214 B_LAB32 = 0x4033, /* Lab- */ 215 B_LABA32 = 0x6033, /* LabA */ 216 216 217 / / Red is at hue 0218 B_HSI24 = 0x4040, / / HSI219 B_HSI32 = 0x4041, / / HSI-220 B_HSIA32 = 0x6041, / / HSIA217 /* Red is at hue 0 */ 218 B_HSI24 = 0x4040, /* HSI */ 219 B_HSI32 = 0x4041, /* HSI- */ 220 B_HSIA32 = 0x6041, /* HSIA */ 221 221 222 B_HSV24 = 0x4042, / / HSV223 B_HSV32 = 0x4043, / / HSV-224 B_HSVA32 = 0x6043, / / HSVA222 B_HSV24 = 0x4042, /* HSV */ 223 B_HSV32 = 0x4043, /* HSV- */ 224 B_HSVA32 = 0x6043, /* HSVA */ 225 225 226 B_HLS24 = 0x4044, / / HLS227 B_HLS32 = 0x4045, / / HLS-228 B_HLSA32 = 0x6045, / / HLSA226 B_HLS24 = 0x4044, /* HLS */ 227 B_HLS32 = 0x4045, /* HLS- */ 228 B_HLSA32 = 0x6045, /* HLSA */ 229 229 230 B_CMY24 = 0xC001, / / CMY231 B_CMY32 = 0xC002, / / CMY-232 B_CMYA32 = 0xE002, / / CMYA233 B_CMYK32 = 0xC003, / / CMYK230 B_CMY24 = 0xC001, /* CMY */ 231 B_CMY32 = 0xC002, /* CMY- */ 232 B_CMYA32 = 0xE002, /* CMYA */ 233 B_CMYK32 = 0xC003, /* CMYK */ 234 234 235 / / compatibility declarations235 /* compatibility declarations */ 236 236 B_MONOCHROME_1_BIT = B_GRAY1, 237 237 B_GRAYSCALE_8_BIT = B_GRAY8, 238 238 B_COLOR_8_BIT = B_CMAP8, … … 243 243 } color_space; 244 244 245 245 246 / / Bitmap Support Flags246 /* Bitmap Support Flags */ 247 247 248 248 enum { 249 249 B_VIEWS_SUPPORT_DRAW_BITMAP = 0x1, … … 266 266 }; 267 267 268 268 269 / / Drawing Modes269 /* Drawing Modes */ 270 270 271 271 enum drawing_mode { 272 272 B_OP_COPY, … … 293 293 }; 294 294 295 295 296 / / Fixed Screen Modes296 /* Fixed Screen Modes */ 297 297 298 298 enum { 299 299 B_8_BIT_640x480 = 0x00000001, … … 324 324 B_8_BIT_640x400 = 0x80000000 325 325 }; 326 326 327 #endif / / _GRAPHICS_DEFS_H327 #endif /* _GRAPHICS_DEFS_H */ -
support/parsedate.h
11 11 12 12 /* flags that will be set in the flags field by parsedate_etc() */ 13 13 #define PARSEDATE_RELATIVE_TIME 0x0001 14 / / ToDo: the following flags are not part of the R5 implementation and preliminary only14 /* ToDo: the following flags are not part of the R5 implementation and preliminary only */ 15 15 #define PARSEDATE_DAY_RELATIVE_TIME PARSEDATE_RELATIVE_TIME 16 16 #define PARSEDATE_MINUTE_RELATIVE_TIME 0x0002 17 17 #define PARSEDATE_INVALID_DATE 0x0100 -
support/Beep.h
11 11 12 12 13 13 #ifdef __cplusplus 14 / / These functions are only exported for C++14 /* These functions are only exported for C++ */ 15 15 16 16 status_t beep(); 17 17 status_t system_beep(const char* eventName); … … 19 19 20 20 #endif 21 21 22 #endif / / _BEEP_H22 #endif /* _BEEP_H */ -
support/TypeConstants.h
56 56 B_UINT8_TYPE = 'UBYT', 57 57 B_VECTOR_ICON_TYPE = 'VICN', 58 58 59 / / deprecated, do not use60 B_ASCII_TYPE = 'TEXT' / / use B_STRING_TYPE instead59 /* deprecated, do not use */ 60 B_ASCII_TYPE = 'TEXT' /* use B_STRING_TYPE instead */ 61 61 }; 62 62 63 / / System-wide MIME types for handling URL's63 /* System-wide MIME types for handling URL's */ 64 64 65 extern const char *B_URL_HTTP; / / application/x-vnd.Be.URL.http66 extern const char *B_URL_HTTPS; / / application/x-vnd.Be.URL.https67 extern const char *B_URL_FTP; / / application/x-vnd.Be.URL.ftp68 extern const char *B_URL_GOPHER; / / application/x-vnd.Be.URL.gopher69 extern const char *B_URL_MAILTO; / / application/x-vnd.Be.URL.mailto70 extern const char *B_URL_NEWS; / / application/x-vnd.Be.URL.news71 extern const char *B_URL_NNTP; / / application/x-vnd.Be.URL.nntp72 extern const char *B_URL_TELNET; / / application/x-vnd.Be.URL.telnet73 extern const char *B_URL_RLOGIN; / / application/x-vnd.Be.URL.rlogin74 extern const char *B_URL_TN3270; / / application/x-vnd.Be.URL.tn327075 extern const char *B_URL_WAIS; / / application/x-vnd.Be.URL.wais76 extern const char *B_URL_FILE; / / application/x-vnd.Be.URL.file65 extern const char *B_URL_HTTP; /* application/x-vnd.Be.URL.http */ 66 extern const char *B_URL_HTTPS; /* application/x-vnd.Be.URL.https */ 67 extern const char *B_URL_FTP; /* application/x-vnd.Be.URL.ftp */ 68 extern const char *B_URL_GOPHER; /* application/x-vnd.Be.URL.gopher */ 69 extern const char *B_URL_MAILTO; /* application/x-vnd.Be.URL.mailto */ 70 extern const char *B_URL_NEWS; /* application/x-vnd.Be.URL.news */ 71 extern const char *B_URL_NNTP; /* application/x-vnd.Be.URL.nntp */ 72 extern const char *B_URL_TELNET; /* application/x-vnd.Be.URL.telnet */ 73 extern const char *B_URL_RLOGIN; /* application/x-vnd.Be.URL.rlogin */ 74 extern const char *B_URL_TN3270; /* application/x-vnd.Be.URL.tn3270 */ 75 extern const char *B_URL_WAIS; /* application/x-vnd.Be.URL.wais */ 76 extern const char *B_URL_FILE; /* application/x-vnd.Be.URL.file */ 77 77 78 #endif / / _TYPE_CONSTANTS_H78 #endif /* _TYPE_CONSTANTS_H */ -
support/UTF8.h
11 11 #include <SupportDefs.h> 12 12 13 13 14 / / Conversion Flavors14 /* Conversion Flavors */ 15 15 enum { 16 B_ISO1_CONVERSION, / / ISO 8859-x16 B_ISO1_CONVERSION, /* ISO 8859-x */ 17 17 B_ISO2_CONVERSION, 18 18 B_ISO3_CONVERSION, 19 19 B_ISO4_CONVERSION, … … 23 23 B_ISO8_CONVERSION, 24 24 B_ISO9_CONVERSION, 25 25 B_ISO10_CONVERSION, 26 B_MAC_ROMAN_CONVERSION, / / Macintosh Roman27 B_SJIS_CONVERSION, / / Shift-JIS28 B_EUC_CONVERSION, / / EUC Packed Japanese29 B_JIS_CONVERSION, / / JIS X 0208-199030 B_MS_WINDOWS_CONVERSION, / / Windows Latin-1 Codepage 125231 B_UNICODE_CONVERSION, / / Unicode 2.0, UCS-232 B_KOI8R_CONVERSION, / / KOI8-R33 B_MS_WINDOWS_1251_CONVERSION, / / Windows Cyrillic Codepage 125134 B_MS_DOS_866_CONVERSION, / / MS-DOS Codepage 86635 B_MS_DOS_CONVERSION, / / MS-DOS Codepage 43736 B_EUC_KR_CONVERSION, / / EUC Korean26 B_MAC_ROMAN_CONVERSION, /* Macintosh Roman */ 27 B_SJIS_CONVERSION, /* Shift-JIS */ 28 B_EUC_CONVERSION, /* EUC Packed Japanese */ 29 B_JIS_CONVERSION, /* JIS X 0208-1990 */ 30 B_MS_WINDOWS_CONVERSION, /* Windows Latin-1 Codepage 1252 */ 31 B_UNICODE_CONVERSION, /* Unicode 2.0, UCS-2 */ 32 B_KOI8R_CONVERSION, /* KOI8-R */ 33 B_MS_WINDOWS_1251_CONVERSION, /* Windows Cyrillic Codepage 1251 */ 34 B_MS_DOS_866_CONVERSION, /* MS-DOS Codepage 866 */ 35 B_MS_DOS_CONVERSION, /* MS-DOS Codepage 437 */ 36 B_EUC_KR_CONVERSION, /* EUC Korean */ 37 37 B_ISO13_CONVERSION, 38 38 B_ISO14_CONVERSION, 39 39 B_ISO15_CONVERSION, 40 B_BIG5_CONVERSION, / / Chinese Big541 B_GBK_CONVERSION, / / Chinese GB1803040 B_BIG5_CONVERSION, /* Chinese Big5 */ 41 B_GBK_CONVERSION, /* Chinese GB18030 */ 42 42 }; 43 43 44 44 45 / / Conversion Functions45 /* Conversion Functions */ 46 46 47 47 #ifdef __cplusplus 48 48 -
drivers/locked_pool.h
41 41 typedef struct { 42 42 module_info minfo; 43 43 44 / / allocate block44 /* allocate block */ 45 45 void *(*alloc)(locked_pool_cookie pool); 46 / / free block46 /* free block */ 47 47 void (*free)(locked_pool_cookie pool, void *block); 48 48 49 / / create new pool50 / / block_size - size of one memory block51 / / alignment - set address bits here that must be zero for block addresses52 / / next_ofs - offset in block where internal next-pointer can be stored53 / / chunk_size - how much system memory is to be allocated at once54 / / max_blocks - maximum number of blocks55 / / min_free_block - minimum number of free blocks56 / / name - name of pool57 / / lock_flags - flags to be passed to lock_memory()58 / / alloc_hook - hook to be called when new block is added to pool (can be NULL )59 / / free_hook - hook to be called when block is removed from pool (can be NULL )60 / / hook_arg - value to be passed to hooks as arg49 /* create new pool */ 50 /* block_size - size of one memory block */ 51 /* alignment - set address bits here that must be zero for block addresses */ 52 /* next_ofs - offset in block where internal next-pointer can be stored */ 53 /* chunk_size - how much system memory is to be allocated at once */ 54 /* max_blocks - maximum number of blocks */ 55 /* min_free_block - minimum number of free blocks */ 56 /* name - name of pool */ 57 /* lock_flags - flags to be passed to lock_memory() */ 58 /* alloc_hook - hook to be called when new block is added to pool (can be NULL ) */ 59 /* free_hook - hook to be called when block is removed from pool (can be NULL ) */ 60 /* hook_arg - value to be passed to hooks as arg */ 61 61 locked_pool_cookie (*create)(int block_size, int alignment, int next_ofs, 62 62 int chunk_size, int max_blocks, int min_free_blocks, const char *name, 63 63 uint32 lock_flags, locked_pool_add_hook add_hook, -
drivers/dpc.h
30 30 } 31 31 #endif 32 32 33 #endif / / _DPC_MODULE_H_33 #endif /* _DPC_MODULE_H_ */ -
drivers/ACPI.h
124 124 } data; 125 125 }; 126 126 127 #endif / / __ACTYPES_H__127 #endif /* __ACTYPES_H__ */ 128 128 129 129 /* Sleep states */ 130 130 … … 145 145 146 146 typedef struct acpi_device_info *acpi_device; 147 147 148 / / Interface to one ACPI device.148 /* Interface to one ACPI device. */ 149 149 typedef struct acpi_device_module_info { 150 150 driver_module_info info; 151 151 -
drivers/ISA.h
11 11 #ifndef _ISA_H 12 12 #define _ISA_H 13 13 14 / /#include <SupportDefs.h>14 /*#include <SupportDefs.h> */ 15 15 #include <bus_manager.h> 16 16 17 17 #ifdef __cplusplus -
drivers/KernelExport.h
14 14 15 15 typedef ulong cpu_status; 16 16 17 / / WARNING: For Haiku debugging only! This changes the spinlock type in a18 / / binary incompatible way!19 / /#define B_DEBUG_SPINLOCK_CONTENTION 117 /* WARNING: For Haiku debugging only! This changes the spinlock type in a */ 18 /* binary incompatible way! */ 19 /*#define B_DEBUG_SPINLOCK_CONTENTION 1 */ 20 20 21 21 #if B_DEBUG_SPINLOCK_CONTENTION 22 22 typedef struct { … … 94 94 #define B_USER_CLONEABLE_AREA 256 95 95 96 96 /* MTR attributes for mapping physical memory (Intel Architecture only) */ 97 / / TODO: rename those to something more meaningful97 /* TODO: rename those to something more meaningful */ 98 98 #define B_MTR_UC 0x10000000 99 99 #define B_MTR_WC 0x20000000 100 100 #define B_MTR_WT 0x30000000 -
drivers/fs_interface.h
25 25 26 26 27 27 /* additional flags passed to write_stat() (see NodeMonitor.h for the others) */ 28 / / NOTE: Changing the constants here or in NodeMonitor.h will break29 / / src/kits/storage/LibBeAdapter.cpp:_kern_write_stat().28 /* NOTE: Changing the constants here or in NodeMonitor.h will break */ 29 /* src/kits/storage/LibBeAdapter.cpp:_kern_write_stat(). */ 30 30 #define B_STAT_SIZE_INSECURE 0x2000 31 / / TODO: this should be faded out once BFS supports sparse files31 /* TODO: this should be faded out once BFS supports sparse files */ 32 32 33 33 /* passed to write_fs_info() */ 34 34 #define FS_WRITE_FSINFO_NAME 0x0001 … … 40 40 41 41 #define B_CURRENT_FS_API_VERSION "/v1" 42 42 43 / / flags for publish_vnode() and fs_volume_ops::get_vnode()43 /* flags for publish_vnode() and fs_volume_ops::get_vnode() */ 44 44 #define B_VNODE_PUBLISH_REMOVED 0x01 45 45 #define B_VNODE_DONT_CREATE_SPECIAL_SUB_NODE 0x02 46 46 … … 243 243 struct module_info info; 244 244 const char* short_name; 245 245 const char* pretty_name; 246 uint32 flags; / / DDM flags246 uint32 flags; /* DDM flags */ 247 247 248 248 /* scanning (the device is write locked) */ 249 249 float (*identify_partition)(int fd, partition_data *partition, … … 294 294 295 295 /* file system add-ons only prototypes */ 296 296 297 / / callbacks for do_iterative_fd_io()297 /* callbacks for do_iterative_fd_io() */ 298 298 typedef status_t (*iterative_io_get_vecs)(void *cookie, io_request* request, 299 299 off_t offset, size_t size, struct file_io_vec *vecs, 300 300 size_t *_count); -
drivers/tty/ttylayer.h
12 12 #include <termios.h> 13 13 14 14 15 / / XXX: should go away or be opacised15 /* XXX: should go away or be opacised */ 16 16 struct str { 17 17 uchar *buffer; 18 18 uint bufsize, count, tail; … … 36 36 uint nopen; 37 37 uint flags; 38 38 struct ddomain dd; 39 struct ddomain ddi; / / used in interrupt context39 struct ddomain ddi; /* used in interrupt context */ 40 40 pid_t pgid; 41 41 struct termios t; 42 42 uint iactivity; … … 56 56 bigtime_t vtime; 57 57 }; 58 58 59 / / flags59 /* flags */ 60 60 #define TTYCARRIER (1 << 0) 61 61 #define TTYWRITABLE (1 << 1) 62 62 #define TTYWRITING (1 << 2) … … 69 69 #define TTYHWRI (1 << 9) 70 70 #define TTYFLOWFORCED (1 << 10) 71 71 72 / / ops72 /* ops */ 73 73 #define TTYENABLE 0 74 74 #define TTYDISABLE 1 75 75 #define TTYSETMODES 2 … … 85 85 86 86 typedef struct tty_module_info tty_module_info; 87 87 88 / / this version is compatible with BeOS R588 /* this version is compatible with BeOS R5 */ 89 89 struct tty_module_info_r5 { 90 / / not a real bus manager... no rescan() !90 /* not a real bus manager... no rescan() ! */ 91 91 module_info mi; 92 92 status_t (*ttyopen)(struct ttyfile *, struct ddrover *, tty_service_func); 93 93 status_t (*ttyclose)(struct ttyfile *, struct ddrover *); … … 105 105 void (*ddacquire)(struct ddrover *, struct ddomain *); 106 106 }; 107 107 108 / / BeOS R5.1d0 has a different module with the same version...109 / / we exort this module as version 1.1 to allow using select from drivers108 /* BeOS R5.1d0 has a different module with the same version... */ 109 /* we exort this module as version 1.1 to allow using select from drivers */ 110 110 struct tty_module_info_dano { 111 / / not a real bus manager... no rescan() !111 /* not a real bus manager... no rescan() ! */ 112 112 module_info mi; 113 113 status_t (*ttyopen)(struct ttyfile *, struct ddrover *, tty_service_func); 114 114 status_t (*ttyclose)(struct ttyfile *, struct ddrover *); -
drivers/interrupt_controller.h
13 13 }; 14 14 15 15 typedef struct interrupt_controller_info { 16 int cpu_count; // number of supported CPUs 17 int irq_count; // number of supported IRQs 16 int cpu_count; /* number of supported CPUs 17 */ 18 int irq_count; /* number of supported IRQs 19 */ 18 20 } interrupt_controller_info; 19 21 20 // interrupt controller drivers 22 /* interrupt controller drivers 23 */ 21 24 typedef struct interrupt_controller_module_info { 22 25 driver_module_info info; 23 26 … … 27 30 status_t (*enable_io_interrupt)(void *cookie, int irq, int type); 28 31 status_t (*disable_io_interrupt)(void *cookie, int irq); 29 32 30 // Returns the IRQ number or a negative value, if the interrupt shall be 31 // ignore (spurious interrupts). Since more than one interrupt can be 32 // pending, the function should be called in a loop until it returns a 33 // negative value. 34 // Must be called with CPU interrupts disabled. 33 /* Returns the IRQ number or a negative value, if the interrupt shall be 34 */ 35 /* ignore (spurious interrupts). Since more than one interrupt can be 36 */ 37 /* pending, the function should be called in a loop until it returns a 38 */ 39 /* negative value. 40 */ 41 /* Must be called with CPU interrupts disabled. 42 */ 35 43 int (*acknowledge_io_interrupt)(void *cookie); 36 44 37 45 } interrupt_controller_module_info; 38 46 39 #endif // _INTERRUPT_CONTROLLER_H 47 #endif /* _INTERRUPT_CONTROLLER_H 48 */ -
drivers/disk_device_manager.h
20 20 * the disk system modules. 21 21 */ 22 22 typedef struct partition_data { 23 partition_id id; / / [sys]23 partition_id id; /* [sys] */ 24 24 off_t offset; 25 25 off_t size; 26 26 off_t content_size; 27 27 uint32 block_size; 28 28 int32 child_count; 29 int32 index; / / [sys]29 int32 index; /* [sys] */ 30 30 uint32 status; 31 31 uint32 flags; 32 dev_t volume; / / [sys]33 void *mount_cookie; / / [sys]34 char *name; / / max: B_OS_NAME_LENGTH35 char *content_name; / /36 char *type; / /37 const char *content_type; / / [sys]32 dev_t volume; /* [sys] */ 33 void *mount_cookie; /* [sys] */ 34 char *name; /* max: B_OS_NAME_LENGTH */ 35 char *content_name; /* */ 36 char *type; /* */ 37 const char *content_type; /* [sys] */ 38 38 char *parameters; 39 39 char *content_parameters; 40 40 void *cookie; 41 41 void *content_cookie; 42 42 } partition_data; 43 43 44 / / C API disk device representation44 /* C API disk device representation */ 45 45 typedef struct disk_device_data { 46 partition_id id; / / equal to that of the root partition46 partition_id id; /* equal to that of the root partition */ 47 47 uint32 flags; 48 48 char *path; 49 49 device_geometry geometry; 50 50 } disk_device_data; 51 51 52 / / C API partitionable space representation52 /* C API partitionable space representation */ 53 53 typedef struct partitionable_space_data { 54 54 off_t offset; 55 55 off_t size; 56 56 } partitionable_space_data; 57 57 58 / / operations on partitions58 /* operations on partitions */ 59 59 enum { 60 B_PARTITION_SHADOW, / / indicates creation of a shadow partition61 B_PARTITION_SHADOW_CHILD, / /60 B_PARTITION_SHADOW, /* indicates creation of a shadow partition */ 61 B_PARTITION_SHADOW_CHILD, /* */ 62 62 B_PARTITION_DEFRAGMENT, 63 63 B_PARTITION_REPAIR, 64 64 B_PARTITION_RESIZE, … … 75 75 B_PARTITION_DELETE_CHILD, 76 76 }; 77 77 78 / / disk device job cancel status78 /* disk device job cancel status */ 79 79 enum { 80 80 B_DISK_DEVICE_JOB_CONTINUE, 81 81 B_DISK_DEVICE_JOB_CANCEL, 82 82 B_DISK_DEVICE_JOB_REVERSE, 83 83 }; 84 84 85 / / disk device locking85 /* disk device locking */ 86 86 disk_device_data *write_lock_disk_device(partition_id partitionID); 87 87 void write_unlock_disk_device(partition_id partitionID); 88 88 disk_device_data *read_lock_disk_device(partition_id partitionID); 89 89 void read_unlock_disk_device(partition_id partitionID); 90 / / parameter is the ID of any partition on the device90 /* parameter is the ID of any partition on the device */ 91 91 92 / / getting disk devices/partitions by path93 / / (no locking required)92 /* getting disk devices/partitions by path */ 93 /* (no locking required) */ 94 94 int32 find_disk_device(const char *path); 95 95 int32 find_partition(const char *path); 96 96 97 / / disk device/partition read access98 / / (read lock required)97 /* disk device/partition read access */ 98 /* (read lock required) */ 99 99 disk_device_data *get_disk_device(partition_id partitionID); 100 100 partition_data *get_partition(partition_id partitionID); 101 101 partition_data *get_parent_partition(partition_id partitionID); 102 102 partition_data *get_child_partition(partition_id partitionID, int32 index); 103 103 104 / / partition write access105 / / (write lock required)104 /* partition write access */ 105 /* (write lock required) */ 106 106 partition_data *create_child_partition(partition_id partitionID, int32 index, 107 107 partition_id childID); 108 / / childID is an optional input parameter -- -1 to be ignored108 /* childID is an optional input parameter -- -1 to be ignored */ 109 109 bool delete_partition(partition_id partitionID); 110 110 void partition_modified(partition_id partitionID); 111 / / tells the disk device manager, that the partition has been modified111 /* tells the disk device manager, that the partition has been modified */ 112 112 113 113 status_t scan_partition(partition_id partitionID); 114 / / Service method for disks systems: Synchronously scans the partition.115 / / Device must not be locked.114 /* Service method for disks systems: Synchronously scans the partition. */ 115 /* Device must not be locked. */ 116 116 117 / / partition support functions118 / / (no lock required)117 /* partition support functions */ 118 /* (no lock required) */ 119 119 status_t get_default_partition_content_name(partition_id partitionID, 120 120 const char* fileSystemName, char* buffer, size_t bufferSize); 121 / / The partition_data::content_size field must already be initialized.121 /* The partition_data::content_size field must already be initialized. */ 122 122 123 / / disk systems123 /* disk systems */ 124 124 disk_system_id find_disk_system(const char *name); 125 125 126 / / jobs126 /* jobs */ 127 127 bool update_disk_device_job_progress(disk_job_id jobID, float progress); 128 128 bool update_disk_device_job_extra_progress(disk_job_id jobID, const char *info); 129 129 bool set_disk_device_job_error_message(disk_job_id jobID, const char *message); 130 130 uint32 update_disk_device_job_interrupt_properties(disk_job_id jobID, 131 131 uint32 interruptProperties); 132 / / returns one of B_DISK_DEVICE_JOB_{CONTINUE,CANCEL,REVERSE}132 /* returns one of B_DISK_DEVICE_JOB_{CONTINUE,CANCEL,REVERSE} */ 133 133 134 134 #ifdef __cplusplus 135 135 } 136 136 #endif 137 137 138 #endif / / _DISK_DEVICE_MANAGER_H138 #endif /* _DISK_DEVICE_MANAGER_H */ -
drivers/bus/ISA.h
30 30 #include <device_manager.h> 31 31 #include <ISA.h> 32 32 33 / / maximum size of one dma transfer34 / / (in bytes for 8 bit transfer, in words for 16 bit transfer)33 /* maximum size of one dma transfer */ 34 /* (in bytes for 8 bit transfer, in words for 16 bit transfer) */ 35 35 #define B_MAX_ISA_DMA_COUNT 0x10000 36 36 37 37 typedef struct isa2_module_info { … … 44 44 uint32 (*read_io_32)(int mapped_io_addr); 45 45 void (*write_io_32)(int mapped_io_addr, uint32 value); 46 46 47 / / don't know what it's for, remains for compatibility47 /* don't know what it's for, remains for compatibility */ 48 48 void *(*ram_address)(const void *physical_address_in_system_memory); 49 49 50 / / start dma transfer (scattered DMA is not supported as it's EISA specific)50 /* start dma transfer (scattered DMA is not supported as it's EISA specific) */ 51 51 status_t (*start_isa_dma)( 52 long channel, / / dma channel to use53 void *buf, / / buffer to transfer54 long transfer_count, / / # transfers55 uchar mode, / / mode flags56 uchar e_mode / / extended mode flags52 long channel, /* dma channel to use */ 53 void *buf, /* buffer to transfer */ 54 long transfer_count, /* # transfers */ 55 uchar mode, /* mode flags */ 56 uchar e_mode /* extended mode flags */ 57 57 ); 58 58 } isa2_module_info; 59 59 60 / / type of isa device60 /* type of isa device */ 61 61 #define ISA_DEVICE_TYPE_NAME "isa/device/v1" 62 / / directory of ISA drivers63 / / (there is only one device node, so put all drivers under "universal")62 /* directory of ISA drivers */ 63 /* (there is only one device node, so put all drivers under "universal") */ 64 64 #define ISA_DRIVERS_DIR "isa" 65 65 66 66 -
drivers/bus/IDE.h
11 11 12 12 13 13 14 / / Controller Driver Node14 /* Controller Driver Node */ 15 15 16 / / attributes:16 /* attributes: */ 17 17 18 / / node type18 /* node type */ 19 19 #define IDE_BUS_TYPE_NAME "bus/ide/v1" 20 / / maximum number of devices connected to controller (uint8, optional, default:2)20 /* maximum number of devices connected to controller (uint8, optional, default:2) */ 21 21 #define IDE_CONTROLLER_MAX_DEVICES_ITEM "ide/max_devices" 22 / / set to not-0 if DMA is supported (uint8, optional, default:0)23 / / (if so, publish necessary blkdev restriction too)22 /* set to not-0 if DMA is supported (uint8, optional, default:0) */ 23 /* (if so, publish necessary blkdev restriction too) */ 24 24 #define IDE_CONTROLLER_CAN_DMA_ITEM "ide/can_DMA" 25 / / set to not-0 if CQ is supported (uint8, optional, default:1)25 /* set to not-0 if CQ is supported (uint8, optional, default:1) */ 26 26 #define IDE_CONTROLLER_CAN_CQ_ITEM "ide/can_CQ" 27 / / name of controller (string, required)27 /* name of controller (string, required) */ 28 28 #define IDE_CONTROLLER_CONTROLLER_NAME_ITEM "ide/controller_name" 29 29 30 30 union ide_task_file; 31 31 typedef unsigned int ide_reg_mask; 32 32 33 / / channel cookie, issued by ide bus manager33 /* channel cookie, issued by ide bus manager */ 34 34 typedef struct ide_bus_info *ide_channel; 35 35 36 / / interface of controller driver36 /* interface of controller driver */ 37 37 typedef struct { 38 38 driver_module_info info; 39 39 … … 58 58 } ide_controller_interface; 59 59 60 60 61 / / Interface for Controller Driver61 /* Interface for Controller Driver */ 62 62 63 / / interface of bus manager as seen from controller driver64 / / use this interface as the fixed consumer of your controller driver63 /* interface of bus manager as seen from controller driver */ 64 /* use this interface as the fixed consumer of your controller driver */ 65 65 typedef struct { 66 66 driver_module_info info; 67 67 68 / / status - status read from controller (_not_ alt_status, as reading69 / / normal status acknowledges IRQ request of device)68 /* status - status read from controller (_not_ alt_status, as reading */ 69 /* normal status acknowledges IRQ request of device) */ 70 70 status_t (*irq_handler)( ide_channel channel, uint8 status ); 71 71 } ide_for_controller_interface; 72 72 -
drivers/bus/SCSI.h
97 97 #include <device_manager.h> 98 98 99 99 100 #define SCSI_MAX_CDB_SIZE 16 / / max size of cdb101 #define SCSI_MAX_SENSE_SIZE 64 / / max size of sense data102 #define SCSI_SIM_PRIV 1536 / / SIM private data; this may be a bit much but103 / / we currently need that for the compatibility layer100 #define SCSI_MAX_CDB_SIZE 16 /* max size of cdb */ 101 #define SCSI_MAX_SENSE_SIZE 64 /* max size of sense data */ 102 #define SCSI_SIM_PRIV 1536 /* SIM private data; this may be a bit much but */ 103 /* we currently need that for the compatibility layer */ 104 104 105 / / bus/device handle105 /* bus/device handle */ 106 106 typedef struct scsi_bus_info *scsi_bus; 107 107 typedef struct scsi_device_info *scsi_device; 108 108 109 109 110 / / structure of one scsi i/o CCB (command control block)110 /* structure of one scsi i/o CCB (command control block) */ 111 111 typedef struct scsi_ccb { 112 struct scsi_ccb *next, *prev; / / internal112 struct scsi_ccb *next, *prev; /* internal */ 113 113 114 uchar subsys_status; / / Returned subsystem status115 uchar device_status; / / Returned scsi device status114 uchar subsys_status; /* Returned subsystem status */ 115 uchar device_status; /* Returned scsi device status */ 116 116 117 uchar path_id; / / Path ID for the request118 uchar target_id; / / Target device ID119 uchar target_lun; / / Target LUN number120 uint32 flags; / / Flags for operation of the subsystem117 uchar path_id; /* Path ID for the request */ 118 uchar target_id; /* Target device ID */ 119 uchar target_lun; /* Target LUN number */ 120 uint32 flags; /* Flags for operation of the subsystem */ 121 121 122 / / released once after asynchronous execution of request;123 / / initialised by alloc_ccb, can be replaced for action but124 / / must be restored before returning via free_ccb122 /* released once after asynchronous execution of request; */ 123 /* initialised by alloc_ccb, can be replaced for action but */ 124 /* must be restored before returning via free_ccb */ 125 125 sem_id completion_sem; 126 126 127 uint8 cdb[SCSI_MAX_CDB_SIZE]; / / command data block128 uchar cdb_length; / / length of command in bytes129 int64 sort; / / value of command to sort on (<0 means n/a)130 bigtime_t timeout; / / timeout - 0 = use default127 uint8 cdb[SCSI_MAX_CDB_SIZE]; /* command data block */ 128 uchar cdb_length; /* length of command in bytes */ 129 int64 sort; /* value of command to sort on (<0 means n/a) */ 130 bigtime_t timeout; /* timeout - 0 = use default */ 131 131 132 uchar *data; / / pointer to data133 const physical_entry *sg_list; / / scatter/gather list134 uint16 sg_count; / / number of S/G entries135 uint32 data_length; / / length of data136 int32 data_resid; / / data transfer residual length: 2's comp132 uchar *data; /* pointer to data */ 133 const physical_entry *sg_list; /* scatter/gather list */ 134 uint16 sg_count; /* number of S/G entries */ 135 uint32 data_length; /* length of data */ 136 int32 data_resid; /* data transfer residual length: 2's comp */ 137 137 void *io_operation; 138 138 139 uchar sense[SCSI_MAX_SENSE_SIZE]; / / autosense data140 uchar sense_resid; / / autosense resid length: 2's comp139 uchar sense[SCSI_MAX_SENSE_SIZE]; /* autosense data */ 140 uchar sense_resid; /* autosense resid length: 2's comp */ 141 141 142 / / private143 bool ordered : 1; / / request cannot overtake/be overtaken by others144 bool buffered : 1; / / data is buffered to make it DMA safe145 bool emulated : 1; / / command is executed as part of emulation142 /* private */ 143 bool ordered : 1; /* request cannot overtake/be overtaken by others */ 144 bool buffered : 1; /* data is buffered to make it DMA safe */ 145 bool emulated : 1; /* command is executed as part of emulation */ 146 146 147 scsi_bus bus; / / associated bus148 scsi_device device; / / associated device149 struct dma_buffer *dma_buffer; / / used dma buffer, or NULL150 uchar state; / / bus manager state147 scsi_bus bus; /* associated bus */ 148 scsi_device device; /* associated device */ 149 struct dma_buffer *dma_buffer; /* used dma buffer, or NULL */ 150 uchar state; /* bus manager state */ 151 151 152 / / original data before command emulation was applied152 /* original data before command emulation was applied */ 153 153 uint8 orig_cdb[SCSI_MAX_CDB_SIZE]; 154 154 uchar orig_cdb_length; 155 155 const physical_entry *orig_sg_list; 156 156 uint16 orig_sg_count; 157 157 uint32 orig_data_length; 158 158 159 / / private SIM data160 uchar sim_state; / / set to zero when request is submitted first time159 /* private SIM data */ 160 uchar sim_state; /* set to zero when request is submitted first time */ 161 161 uchar sim_priv[SCSI_SIM_PRIV]; /* SIM private data area */ 162 162 } scsi_ccb; 163 163 164 164 165 / / Defines for the subsystem status field165 /* Defines for the subsystem status field */ 166 166 167 167 #define SCSI_REQ_INPROG 0x00 /* request is in progress */ 168 168 #define SCSI_REQ_CMP 0x01 /* request completed w/out error */ … … 207 207 #define SCSI_SUBSYS_STATUS_MASK 0x3F /* Mask bits for just the status # */ 208 208 209 209 210 / / Defines for the flags field210 /* Defines for the flags field */ 211 211 212 212 #define SCSI_DIR_RESV 0x00000000 /* Data direction (00: reserved) */ 213 213 #define SCSI_DIR_IN 0x00000040 /* Data direction (01: DATA IN) */ … … 216 216 #define SCSI_DIR_MASK 0x000000C0 217 217 218 218 #define SCSI_DIS_AUTOSENSE 0x00000020 /* Disable autosense feature */ 219 #define SCSI_ORDERED_QTAG 0x00000010 / / ordered queue (cannot overtake/be overtaken)220 #define SCSI_DMA_SAFE 0x00000008 / / set if data buffer is DMA approved219 #define SCSI_ORDERED_QTAG 0x00000010 /* ordered queue (cannot overtake/be overtaken) */ 220 #define SCSI_DMA_SAFE 0x00000008 /* set if data buffer is DMA approved */ 221 221 222 222 #define SCSI_DIS_DISCONNECT 0x00008000 /* Disable disconnect */ 223 223 #define SCSI_INITIATE_SYNC 0x00004000 /* Attempt Sync data xfer, and SDTR */ … … 225 225 #define SCSI_ENG_SYNC 0x00000200 /* Flush resid bytes before cmplt */ 226 226 227 227 228 / / Defines for the Path Inquiry CCB fields228 /* Defines for the Path Inquiry CCB fields */ 229 229 230 / / flags in hba_inquiry230 /* flags in hba_inquiry */ 231 231 #define SCSI_PI_MDP_ABLE 0x80 /* Supports MDP message */ 232 232 #define SCSI_PI_WIDE_32 0x40 /* Supports 32 bit wide SCSI */ 233 233 #define SCSI_PI_WIDE_16 0x20 /* Supports 16 bit wide SCSI */ … … 235 235 #define SCSI_PI_TAG_ABLE 0x02 /* Supports tag queue message */ 236 236 #define SCSI_PI_SOFT_RST 0x01 /* Supports soft reset */ 237 237 238 / / flags in hba_misc238 /* flags in hba_misc */ 239 239 #define SCSI_PIM_SCANHILO 0x80 /* Bus scans from ID 7 to ID 0 */ 240 240 #define SCSI_PIM_NOREMOVE 0x40 /* Removable dev not included in scan */ 241 241 242 / / sizes of inquiry fields242 /* sizes of inquiry fields */ 243 243 #define SCSI_VUHBA 14 /* Vendor Unique HBA length */ 244 244 #define SCSI_SIM_ID 16 /* ASCII string len for SIM ID */ 245 245 #define SCSI_HBA_ID 16 /* ASCII string len for HBA ID */ … … 248 248 #define SCSI_VERS 8 /* ASCII string len for SIM & HBA vers */ 249 249 250 250 251 / / Path inquiry, extended by BeOS XPT_EXTENDED_PATH_INQ parameters251 /* Path inquiry, extended by BeOS XPT_EXTENDED_PATH_INQ parameters */ 252 252 typedef struct { 253 253 uchar version_num; /* Version number for the SIM/HBA */ 254 254 uchar hba_inquiry; /* Mimic of INQ byte 7 for the HBA */ … … 256 256 uint32 sim_priv; /* Size of SIM private data area */ 257 257 uchar vuhba_flags[SCSI_VUHBA];/* Vendor unique capabilities */ 258 258 uchar initiator_id; /* ID of the HBA on the SCSI bus */ 259 uint32 hba_queue_size; / / size of adapaters command queue259 uint32 hba_queue_size; /* size of adapaters command queue */ 260 260 char sim_vid[SCSI_SIM_ID]; /* Vendor ID of the SIM */ 261 261 char hba_vid[SCSI_HBA_ID]; /* Vendor ID of the HBA */ 262 262 … … 267 267 } scsi_path_inquiry; 268 268 269 269 270 / / Device node270 /* Device node */ 271 271 272 / / target (uint8)272 /* target (uint8) */ 273 273 #define SCSI_DEVICE_TARGET_ID_ITEM "scsi/target_id" 274 / / lun (uint8)274 /* lun (uint8) */ 275 275 #define SCSI_DEVICE_TARGET_LUN_ITEM "scsi/target_lun" 276 / / node type276 /* node type */ 277 277 #define SCSI_DEVICE_TYPE_NAME "scsi/device/v1" 278 / / device inquiry data (raw scsi_res_inquiry)278 /* device inquiry data (raw scsi_res_inquiry) */ 279 279 #define SCSI_DEVICE_INQUIRY_ITEM "scsi/device_inquiry" 280 / / device type (uint8)280 /* device type (uint8) */ 281 281 #define SCSI_DEVICE_TYPE_ITEM "scsi/type" 282 / / vendor name (string)282 /* vendor name (string) */ 283 283 #define SCSI_DEVICE_VENDOR_ITEM "scsi/vendor" 284 / / product name (string)284 /* product name (string) */ 285 285 #define SCSI_DEVICE_PRODUCT_ITEM "scsi/product" 286 / / revision (string)286 /* revision (string) */ 287 287 #define SCSI_DEVICE_REVISION_ITEM "scsi/revision" 288 288 289 / / maximum targets on scsi bus289 /* maximum targets on scsi bus */ 290 290 #define SCSI_DEVICE_MAX_TARGET_COUNT "scsi/max_target_count" 291 291 292 / / directory containing links to peripheral drivers292 /* directory containing links to peripheral drivers */ 293 293 #define SCSI_PERIPHERAL_DRIVERS_DIR "scsi" 294 294 295 / / bus manager device interface for peripheral driver295 /* bus manager device interface for peripheral driver */ 296 296 typedef struct scsi_device_interface { 297 297 driver_module_info info; 298 298 299 / / get CCB300 / / warning: if pool of CCBs is exhausted, this call is delayed until a301 / / CCB is freed, so don't try to allocate more then one CCB at once!299 /* get CCB */ 300 /* warning: if pool of CCBs is exhausted, this call is delayed until a */ 301 /* CCB is freed, so don't try to allocate more then one CCB at once! */ 302 302 scsi_ccb *(*alloc_ccb)(scsi_device device); 303 / / free CCB303 /* free CCB */ 304 304 void (*free_ccb)(scsi_ccb *ccb); 305 305 306 / / execute command asynchronously307 / / when it's finished, the semaphore of the ccb is released308 / / you must provide a S/G list if data_len != 0306 /* execute command asynchronously */ 307 /* when it's finished, the semaphore of the ccb is released */ 308 /* you must provide a S/G list if data_len != 0 */ 309 309 void (*async_io)(scsi_ccb *ccb); 310 / / execute command synchronously311 / / you don't need to provide a S/G list nor have to lock data310 /* execute command synchronously */ 311 /* you don't need to provide a S/G list nor have to lock data */ 312 312 void (*sync_io)(scsi_ccb *ccb); 313 313 314 / / abort request314 /* abort request */ 315 315 uchar (*abort)(scsi_ccb *ccb_to_abort); 316 / / reset device316 /* reset device */ 317 317 uchar (*reset_device)(scsi_device device); 318 / / terminate request318 /* terminate request */ 319 319 uchar (*term_io)(scsi_ccb *ccb_to_terminate); 320 320 321 321 status_t (*ioctl)(scsi_device device, uint32 op, void *buffer, size_t length); … … 324 324 #define SCSI_DEVICE_MODULE_NAME "bus_managers/scsi/device/driver_v1" 325 325 326 326 327 / / Bus node327 /* Bus node */ 328 328 329 / / attributes:329 /* attributes: */ 330 330 331 / / path (uint8)331 /* path (uint8) */ 332 332 #define SCSI_BUS_PATH_ID_ITEM "scsi/path_id" 333 / / node type333 /* node type */ 334 334 #define SCSI_BUS_TYPE_NAME "scsi/bus" 335 335 336 / / SCSI bus node driver.337 / / This interface can be used by peripheral drivers to access the338 / / bus directly.336 /* SCSI bus node driver. */ 337 /* This interface can be used by peripheral drivers to access the */ 338 /* bus directly. */ 339 339 typedef struct scsi_bus_interface { 340 340 driver_module_info info; 341 341 342 / / get information about host controller342 /* get information about host controller */ 343 343 uchar (*path_inquiry)(scsi_bus bus, scsi_path_inquiry *inquiry_data); 344 / / reset SCSI bus344 /* reset SCSI bus */ 345 345 uchar (*reset_bus)(scsi_bus bus); 346 346 } scsi_bus_interface; 347 347 348 / / name of SCSI bus node driver348 /* name of SCSI bus node driver */ 349 349 #define SCSI_BUS_MODULE_NAME "bus_managers/scsi/bus/driver_v1" 350 350 351 351 352 / / Interface for SIM352 /* Interface for SIM */ 353 353 354 / / cookie for dpc354 /* cookie for dpc */ 355 355 typedef struct scsi_dpc_info *scsi_dpc_cookie; 356 356 357 / / Bus manager interface used by SCSI controller drivers.358 / / SCSI controller drivers get this interface passed via their init_device359 / / method. Further, they must specify this driver as their fixed consumer.357 /* Bus manager interface used by SCSI controller drivers. */ 358 /* SCSI controller drivers get this interface passed via their init_device */ 359 /* method. Further, they must specify this driver as their fixed consumer. */ 360 360 typedef struct scsi_for_sim_interface { 361 361 driver_module_info info; 362 362 363 / / put request into wait queue because of overflow364 / / bus_overflow: true - too many bus requests365 / / false - too many device requests366 / / bus/device won't receive requests until cont_sent_bus/cont_send_device367 / / is called or a request is finished via finished();368 / / to avoid race conditions (reporting a full and a available bus at once)369 / / the SIM should synchronize calls to requeue, resubmit and finished363 /* put request into wait queue because of overflow */ 364 /* bus_overflow: true - too many bus requests */ 365 /* false - too many device requests */ 366 /* bus/device won't receive requests until cont_sent_bus/cont_send_device */ 367 /* is called or a request is finished via finished(); */ 368 /* to avoid race conditions (reporting a full and a available bus at once) */ 369 /* the SIM should synchronize calls to requeue, resubmit and finished */ 370 370 void (*requeue)(scsi_ccb *ccb, bool bus_overflow); 371 / / resubmit request ASAP372 / / to be used if execution of request went wrong and must be retried371 /* resubmit request ASAP */ 372 /* to be used if execution of request went wrong and must be retried */ 373 373 void (*resubmit)(scsi_ccb *ccb); 374 / / mark request as being finished375 / / num_requests: number of requests that were handled by device376 / / when the request was sent (read: how full was the device377 / / queue); needed to find out how large the device queue is;378 / / e.g. if three were already running plus this request makes379 / / num_requests=4374 /* mark request as being finished */ 375 /* num_requests: number of requests that were handled by device */ 376 /* when the request was sent (read: how full was the device */ 377 /* queue); needed to find out how large the device queue is; */ 378 /* e.g. if three were already running plus this request makes */ 379 /* num_requests=4 */ 380 380 void (*finished)(scsi_ccb *ccb, uint num_requests); 381 381 382 / / following functions return error on invalid arguments only382 /* following functions return error on invalid arguments only */ 383 383 status_t (*alloc_dpc)(scsi_dpc_cookie *dpc); 384 384 status_t (*free_dpc)(scsi_dpc_cookie dpc); 385 385 status_t (*schedule_dpc)(scsi_bus cookie, scsi_dpc_cookie dpc, /*int flags,*/ 386 386 void (*func)( void * ), void *arg); 387 387 388 / / block entire bus (can be nested)389 / / no more request will be submitted to this bus388 /* block entire bus (can be nested) */ 389 /* no more request will be submitted to this bus */ 390 390 void (*block_bus)(scsi_bus bus); 391 / / unblock entire bus392 / / requests will be submitted to bus ASAP391 /* unblock entire bus */ 392 /* requests will be submitted to bus ASAP */ 393 393 void (*unblock_bus)(scsi_bus bus); 394 / / block one device395 / / no more requests will be submitted to this device394 /* block one device */ 395 /* no more requests will be submitted to this device */ 396 396 void (*block_device)(scsi_device device); 397 / / unblock device398 / / requests for this device will be submitted ASAP397 /* unblock device */ 398 /* requests for this device will be submitted ASAP */ 399 399 void (*unblock_device)(scsi_device device); 400 400 401 / / terminate bus overflow condition (see "requeue")401 /* terminate bus overflow condition (see "requeue") */ 402 402 void (*cont_send_bus)(scsi_bus bus); 403 / / terminate device overflow condition (see "requeue")403 /* terminate device overflow condition (see "requeue") */ 404 404 void (*cont_send_device)(scsi_device device); 405 405 } scsi_for_sim_interface; 406 406 … … 408 408 #define SCSI_FOR_SIM_MODULE_NAME "bus_managers/scsi/sim/driver_v1" 409 409 410 410 411 / / SIM Node411 /* SIM Node */ 412 412 413 / / attributes:413 /* attributes: */ 414 414 415 / / node type415 /* node type */ 416 416 #define SCSI_SIM_TYPE_NAME "bus/scsi/v1" 417 / / controller name (required, string)417 /* controller name (required, string) */ 418 418 #define SCSI_DESCRIPTION_CONTROLLER_NAME "controller_name" 419 419 420 420 typedef void *scsi_sim_cookie; 421 421 422 / / SIM interface423 / / SCSI controller drivers must provide this interface422 /* SIM interface */ 423 /* SCSI controller drivers must provide this interface */ 424 424 typedef struct scsi_sim_interface { 425 425 driver_module_info info; 426 426 427 427 void (*set_scsi_bus)(scsi_sim_cookie cookie, scsi_bus bus); 428 428 429 / / execute request429 /* execute request */ 430 430 void (*scsi_io)(scsi_sim_cookie cookie, scsi_ccb *ccb); 431 / / abort request431 /* abort request */ 432 432 uchar (*abort)(scsi_sim_cookie cookie, scsi_ccb *ccb_to_abort); 433 / / reset device433 /* reset device */ 434 434 uchar (*reset_device)(scsi_sim_cookie cookie, uchar target_id, uchar target_lun); 435 / / terminate request435 /* terminate request */ 436 436 uchar (*term_io)(scsi_sim_cookie cookie, scsi_ccb *ccb_to_terminate); 437 437 438 / / get information about bus438 /* get information about bus */ 439 439 uchar (*path_inquiry)(scsi_sim_cookie cookie, scsi_path_inquiry *inquiry_data); 440 / / scan bus441 / / this is called immediately before the SCSI bus manager scans the bus440 /* scan bus */ 441 /* this is called immediately before the SCSI bus manager scans the bus */ 442 442 uchar (*scan_bus)(scsi_sim_cookie cookie); 443 / / reset bus443 /* reset bus */ 444 444 uchar (*reset_bus)(scsi_sim_cookie cookie); 445 445 446 / / get restrictions of one device447 / / (used for non-SCSI transport protocols and bug fixes)446 /* get restrictions of one device */ 447 /* (used for non-SCSI transport protocols and bug fixes) */ 448 448 void (*get_restrictions)(scsi_sim_cookie cookie, 449 uchar target_id, / / target id450 bool *is_atapi, / / set to true if this is an ATAPI device that451 / / needs some commands emulated452 bool *no_autosense, / / set to true if there is no autosense;453 / / the SCSI bus manager will request sense on454 / / SCSI_REQ_CMP_ERR/SCSI_STATUS_CHECK_CONDITION455 uint32 *max_blocks ); / / maximum number of blocks per transfer if > 0;456 / / used for buggy devices that cannot handle457 / / large transfers (read: ATAPI ZIP drives)449 uchar target_id, /* target id */ 450 bool *is_atapi, /* set to true if this is an ATAPI device that */ 451 /* needs some commands emulated */ 452 bool *no_autosense, /* set to true if there is no autosense; */ 453 /* the SCSI bus manager will request sense on */ 454 /* SCSI_REQ_CMP_ERR/SCSI_STATUS_CHECK_CONDITION */ 455 uint32 *max_blocks ); /* maximum number of blocks per transfer if > 0; */ 456 /* used for buggy devices that cannot handle */ 457 /* large transfers (read: ATAPI ZIP drives) */ 458 458 459 459 status_t (*ioctl)(scsi_sim_cookie, uint8 targetID, uint32 op, void *buffer, size_t length); 460 460 } scsi_sim_interface; -
drivers/usb/USB_langIDs.h
1 1 #ifndef USB_LANGIDS_H 2 2 #define USB_LANGIDS_H 3 3 4 / / USB Language Identifiers, 3/29/2000, version 1.05 / / Reference: http://www.usb.org/developers/docs/USB_LANGIDs.pdf4 /* USB Language Identifiers, 3/29/2000, version 1.0 */ 5 /* Reference: http://www.usb.org/developers/docs/USB_LANGIDs.pdf */ 6 6 7 #define USB_LANGIDS_VERSION 0x0100 / / version 1.07 #define USB_LANGIDS_VERSION 0x0100 /* version 1.0 */ 8 8 9 / / descriptor string index 0 = supported LANGIDs array9 /* descriptor string index 0 = supported LANGIDs array */ 10 10 #define USB_LANGIDS_STRING_INDEX (0) 11 12 #define USB_PRIMARY_LANGID_MASK (0x003F) // 9 to 0 bits13 #define USB_SUB_LANGID_MASK (0xFC00) // 15 to 10 bits14 15 #define USB_PRIMARY_LANGID(id) (id & USB_PRIMARY_LANGID_MASK)16 #define USB_SUB_LANGID(id) ((id & USB_SUB_LANGID_MASK) >> 10)17 11 12 #define USB_PRIMARY_LANGID_MASK (0x003F) /* 9 to 0 bits */ 13 #define USB_SUB_LANGID_MASK (0xFC00) /* 15 to 10 bits */ 14 15 #define USB_PRIMARY_LANGID(id) (id & USB_PRIMARY_LANGID_MASK) 16 #define USB_SUB_LANGID(id) ((id & USB_SUB_LANGID_MASK) >> 10) 17 18 18 enum { 19 USB_LANGID_AFRIKAANS = 0x0436, // Afrikaans 20 USB_LANGID_ALBANIAN = 0x041c, // Albanian 21 USB_LANGID_ARABIC_SAUDI_ARABIA = 0x0401, // Arabic (Saudi Arabia) 22 USB_LANGID_ARABIC_IRAK = 0x0801, // Arabic (Irak) 23 USB_LANGID_ARABIC_EGYPT = 0x0c01, // Arabic (Egypt) 24 USB_LANGID_ARABIC_LYBYA = 0x1001, // Arabic (Libya) 25 USB_LANGID_ARABIC_ALGERIA = 0x1401, // Arabic (Algeria) 26 USB_LANGID_ARABIC_MOROCCO = 0x1801, // Arabic (Morocco) 27 USB_LANGID_ARABIC_TUNISIA = 0x1c01, // Arabic (Tunisia) 28 USB_LANGID_ARABIC_OMAN = 0x2001, // Arabic (Oman) 29 USB_LANGID_ARABIC_YEMEN = 0x2401, // Arabic (Yemen) 30 USB_LANGID_ARABIC_SYRIA = 0x2801, // Arabic (Syria) 31 USB_LANGID_ARABIC_JORDAN = 0x2c01, // Arabic (Jordan) 32 USB_LANGID_ARABIC_LEBANON = 0x3001, // Arabic (Lebanon) 33 USB_LANGID_ARABIC_KUWAIT = 0x3401, // Arabic (Kuwait) 34 USB_LANGID_ARABIC_UAE = 0x3801, // Arabic (U.A.E.) 35 USB_LANGID_ARABIC_BAHRAIN = 0x3c01, // Arabic (Bahrain) 36 USB_LANGID_ARABIC_QATAR = 0x4001, // Arabic (Qatar) 37 USB_LANGID_ARMENIAN = 0x042b, // Armenian 38 USB_LANGID_ASSAMESE = 0x044d, // Assamese 39 USB_LANGID_AZERI_LATIN = 0x042c, // Azeri (Latin) 40 USB_LANGID_AZERI_CYRILLIC = 0x082c, // Azeri (Cyrillic) 41 USB_LANGID_BASQUE = 0x042d, // Basque 42 USB_LANGID_BELARUSSIAN = 0x0423, // Belarussian 43 USB_LANGID_BENGALI = 0x0445, // Bengali 44 USB_LANGID_BULGARIAN = 0x0402, // Bulgarian 45 USB_LANGID_BURMESE = 0x0455, // Burmese 46 USB_LANGID_CATALAN = 0x0403, // Catalan 47 USB_LANGID_CHINESE_TAIWAN = 0x0404, // Chinese (Taiwan) 48 USB_LANGID_CHINESE_PRC = 0x0804, // Chinese (PRC = People Republic of Chinese) 49 USB_LANGID_CHINESE_HONG_KONG = 0x0c04, // Chinese (Hong Kong) 50 USB_LANGID_CHINESE_SINGAPORE = 0x1004, // Chinese (Singapore) 51 USB_LANGID_CHINESE_MACAU_SAR = 0x1404, // Chinese (Macau SAR) 52 USB_LANGID_CROATIAN = 0x041a, // Croatian 53 USB_LANGID_CZECH = 0x0405, // Czech 54 USB_LANGID_DANISH = 0x0406, // Danish 55 USB_LANGID_DUTCH_NETHERLANDS = 0x0413, // Dutch (Netherlands) 56 USB_LANGID_DUTCH_BELGIUM = 0x0813, // Dutch (Belgium) 57 USB_LANGID_ENGLISH_UNITED_STATES = 0x0409, // English (United States) 58 USB_LANGID_ENGLISH_UNITED_KINGDOM = 0x0809, // English (United Kingdom) 59 USB_LANGID_ENGLISH_AUSTRALIAN = 0x0c09, // English (Australian) 60 USB_LANGID_ENGLISH_CANADIAN = 0x1009, // English (Canadian) 61 USB_LANGID_ENGLISH_NEW_ZEALAND = 0x1409, // English (New Zealand) 62 USB_LANGID_ENGLISH_IRELAND = 0x1809, // English (Ireland) 63 USB_LANGID_ENGLISH_SOUTH_AFRICA = 0x1c09, // English (South Africa) 64 USB_LANGID_ENGLISH_JAMAICA = 0x2009, // English (Jamaica) 65 USB_LANGID_ENGLISH_CARIBBEAN = 0x2409, // English (Caribbean) 66 USB_LANGID_ENGLISH_BELIZE = 0x2809, // English (Belize) 67 USB_LANGID_ENGLISH_TRINIDAD = 0x2c09, // English (Trinidad) 68 USB_LANGID_ENGLISH_ZIMBABWE = 0x3009, // English (Zimbabwe) 69 USB_LANGID_ENGLISH_PHLIPPINES = 0x3409, // English (Philippines) 70 USB_LANGID_ESTONIAN = 0x0425, // Estonian 71 USB_LANGID_FAEROESE = 0x0438, // Faeroese 72 USB_LANGID_FARSI = 0x0429, // Farsi 73 USB_LANGID_FINNISH = 0x040b, // Finnish 74 USB_LANGID_FRENCH_STANDARD = 0x040c, // French (Standard) 75 USB_LANGID_FRENCH_BELGIAN = 0x080c, // French (Belgian) 76 USB_LANGID_FRENCH_CANADIAN = 0x0c0c, // French (Canadian) 77 USB_LANGID_FRENCH_SWITZERLAND = 0x100c, // French (Switzerland) 78 USB_LANGID_FRENCH_LUXEMBOURG = 0x140c, // French (Luxembourg) 79 USB_LANGID_FRENCH_MONACO = 0x180c, // French (Monaco) 80 USB_LANGID_GEORGIAN = 0x0437, // Georgian 81 USB_LANGID_GERMAN_STANDARD = 0x0407, // German (Standard) 82 USB_LANGID_GERMAN_SWITZERLAND = 0x0807, // German (Switzerland) 83 USB_LANGID_GERMAN_AUSTRIA = 0x0c07, // German (Austria) 84 USB_LANGID_GERMAN_LUXEMBOURG = 0x1007, // German (Luxembourg) 85 USB_LANGID_GERMAN_LIECHTENSTEIN = 0x1407, // German (Liechtenstein) 86 USB_LANGID_GREEK = 0x0408, // Greek 87 USB_LANGID_GUJARATI = 0x0447, // Gujarati 88 USB_LANGID_HEBREW = 0x040d, // Hebrew 89 USB_LANGID_HINDI = 0x0439, // Hindi 90 USB_LANGID_HUNGARIAN = 0x040e, // Hungarian 91 USB_LANGID_ICELANDIC = 0x040f, // Icelandic 92 USB_LANGID_INDONESIAN = 0x0421, // Indonesian 93 USB_LANGID_ITALIAN_STANDARD = 0x0410, // Italian (Standard) 94 USB_LANGID_ITALIAN_SWITZERLAND = 0x0810, // Italian (Switzerland) 95 USB_LANGID_JAPANESE = 0x0411, // Japanese 96 USB_LANGID_KANNADA = 0x044b, // Kannada 97 USB_LANGID_KASHMIRI_INDIA = 0x0860, // Kashmiri (India) 98 USB_LANGID_KAZAKH = 0x043f, // Kazakh 99 USB_LANGID_KONKANI = 0x0457, // Konkani 100 USB_LANGID_KOREAN_JOHAB = 0x0412, // Korean (Johab) 101 USB_LANGID_LATVIAN = 0x0426, // Latvian 102 USB_LANGID_LITHUANIAN = 0x0427, // Lithuanian 103 USB_LANGID_LITHUANIAN_CLASSIC = 0x0827, // Lithuanian (Classic) 104 USB_LANGID_MACEDONIAN = 0x042f, // Macedonian 105 USB_LANGID_MALAY_MALAYSIAN = 0x043e, // Malay (Malaysian) 106 USB_LANGID_MALAY_BRUNEI_DARUSSALAM = 0x083e, // Malay (Brunei Darussalam) 107 USB_LANGID_MALAYALAM = 0x044c, // Malayalam 108 USB_LANGID_MANIPURI = 0x0458, // Manipuri 109 USB_LANGID_MARATHI = 0x044e, // Marathi 110 USB_LANGID_NEPALI_INDIA = 0x0861, // Nepali (India) 111 USB_LANGID_NORWEGIAN_BOKMAL = 0x0414, // Norwegian (Bokmal) 112 USB_LANGID_NORWEGIAN_NYNORSK = 0x0814, // Norwegian (Nynorsk) 113 USB_LANGID_ORIYA = 0x0448, // Oriya 114 USB_LANGID_POLISH = 0x0415, // Polish 115 USB_LANGID_PORTUGUESE_BRAZIL = 0x0416, // Portuguese (Brazil) 116 USB_LANGID_PORTUGUESE_STANDARD = 0x0816, // Portuguese (Standard) 117 USB_LANGID_PUNJABI = 0x0446, // Punjabi 118 USB_LANGID_ROMANIAN = 0x0418, // Romanian 119 USB_LANGID_RUSSIAN = 0x0419, // Russian 120 USB_LANGID_SANSKRIT = 0x044f, // Sanskrit 121 USB_LANGID_SERBIAN_CYRILLIC = 0x0c1a, // Serbian (Cyrillic) 122 USB_LANGID_SERBIAN_LATIN = 0x081a, // Serbian (Latin) 123 USB_LANGID_SINDHI = 0x0459, // Sindhi 124 USB_LANGID_SLOVAK = 0x041b, // Slovak 125 USB_LANGID_SLOVENIAN = 0x0424, // Slovenian 126 USB_LANGID_SPANNISH_TRADITIONAL_SORT= 0x040a, // Spannish (Traditional Sort) 127 USB_LANGID_SPANNISH_MEXICAN = 0x080a, // Spannish (Mexican) 128 USB_LANGID_SPANNISH_MODERN_SORT = 0x0c0a, // Spannish (Modern Sort) 129 USB_LANGID_SPANNISH_GUATEMALA = 0x100a, // Spannish (Guatemala) 130 USB_LANGID_SPANNISH_COSTA_RICA = 0x140a, // Spannish (Costa Rica) 131 USB_LANGID_SPANNISH_PANAMA = 0x180a, // Spannish (Panama) 132 USB_LANGID_SPANNISH_DOMINICAN_REPUBLIC = 0x1c0a, // Spannish (Dominican Republic) 133 USB_LANGID_SPANNISH_VENEZUELA = 0x200a, // Spannish (Venezuela) 134 USB_LANGID_SPANNISH_COLOMBIA = 0x240a, // Spannish (Colombia) 135 USB_LANGID_SPANNISH_PERU = 0x280a, // Spannish (Peru) 136 USB_LANGID_SPANNISH_ARGENTINA = 0x2c0a, // Spannish (Argentina) 137 USB_LANGID_SPANNISH_ECUADOR = 0x300a, // Spannish (Ecuador) 138 USB_LANGID_SPANNISH_CHILE = 0x340a, // Spannish (Chile) 139 USB_LANGID_SPANNISH_URUGUAY = 0x380a, // Spannish (Uruguay) 140 USB_LANGID_SPANNISH_PARAGUAY = 0x3c0a, // Spannish (Paraguay) 141 USB_LANGID_SPANNISH_BOLIVIA = 0x400a, // Spannish (Bolivia) 142 USB_LANGID_SPANNISH_EL_SALVADOR = 0x440a, // Spannish (El Salvador) 143 USB_LANGID_SPANNISH_HONDURAS = 0x480a, // Spannish (Honduras) 144 USB_LANGID_SPANNISH_NICARAGUA = 0x4c0a, // Spannish (Nicaragua) 145 USB_LANGID_SPANNISH_PUERTO_RICO = 0x500a, // Spannish (Puerto Rico) 146 USB_LANGID_SUTU = 0x0430, // Sutu 147 USB_LANGID_SWAHILI_KENYA = 0x0441, // Swahili (Kenya) 148 USB_LANGID_SWEDISH = 0x041d, // Swedish 149 USB_LANGID_SWEDISH_FINLAND = 0x081d, // Swedish (Finland) 150 USB_LANGID_TAMIL = 0x0449, // Tamil 151 USB_LANGID_TATAR_TATARSTAN = 0x0444, // Tatar (Tatarstan) 152 USB_LANGID_TELUGU = 0x044a, // Telugu 153 USB_LANGID_THAI = 0x041e, // Thai 154 USB_LANGID_TURKISH = 0x041f, // Turkish 155 USB_LANGID_UKRAINIAN = 0x0422, // Ukrainian 156 USB_LANGID_URDU_PAKISTAN = 0x0420, // Urdu (Pakistan) 157 USB_LANGID_URDU_INDIA = 0x0820, // Urdu (India) 158 USB_LANGID_UZBEK_LATIN = 0x0443, // Uzbek (Latin) 159 USB_LANGID_UZBEK_CYRILLIC = 0x0843, // Uzbek (Cyrillic) 160 USB_LANGID_VIETNAMESE = 0x042a, // Vietnamese 161 162 USB_LANGID_HID_UDD = 0x04ff, // HID (Usage Data Descriptor) 163 USB_LANGID_HID1 = 0xf0ff, // HID (Vendor Defined 1) 164 USB_LANGID_HID2 = 0xf4ff, // HID (Vendor Defined 2) 165 USB_LANGID_HID3 = 0xf8ff, // HID (Vendor Defined 3) 166 USB_LANGID_HID4 = 0xfcff, // HID (Vendor Defined 4) 19 USB_LANGID_AFRIKAANS = 0x0436, /* Afrikaans */ 20 USB_LANGID_ALBANIAN = 0x041c, /* Albanian */ 21 USB_LANGID_ARABIC_SAUDI_ARABIA = 0x0401, /* Arabic (Saudi Arabia) */ 22 USB_LANGID_ARABIC_IRAK = 0x0801, /* Arabic (Irak) */ 23 USB_LANGID_ARABIC_EGYPT = 0x0c01, /* Arabic (Egypt) */ 24 USB_LANGID_ARABIC_LYBYA = 0x1001, /* Arabic (Libya) */ 25 USB_LANGID_ARABIC_ALGERIA = 0x1401, /* Arabic (Algeria) */ 26 USB_LANGID_ARABIC_MOROCCO = 0x1801, /* Arabic (Morocco) */ 27 USB_LANGID_ARABIC_TUNISIA = 0x1c01, /* Arabic (Tunisia) */ 28 USB_LANGID_ARABIC_OMAN = 0x2001, /* Arabic (Oman) */ 29 USB_LANGID_ARABIC_YEMEN = 0x2401, /* Arabic (Yemen) */ 30 USB_LANGID_ARABIC_SYRIA = 0x2801, /* Arabic (Syria) */ 31 USB_LANGID_ARABIC_JORDAN = 0x2c01, /* Arabic (Jordan) */ 32 USB_LANGID_ARABIC_LEBANON = 0x3001, /* Arabic (Lebanon) */ 33 USB_LANGID_ARABIC_KUWAIT = 0x3401, /* Arabic (Kuwait) */ 34 USB_LANGID_ARABIC_UAE = 0x3801, /* Arabic (U.A.E.) */ 35 USB_LANGID_ARABIC_BAHRAIN = 0x3c01, /* Arabic (Bahrain) */ 36 USB_LANGID_ARABIC_QATAR = 0x4001, /* Arabic (Qatar) */ 37 USB_LANGID_ARMENIAN = 0x042b, /* Armenian */ 38 USB_LANGID_ASSAMESE = 0x044d, /* Assamese */ 39 USB_LANGID_AZERI_LATIN = 0x042c, /* Azeri (Latin) */ 40 USB_LANGID_AZERI_CYRILLIC = 0x082c, /* Azeri (Cyrillic) */ 41 USB_LANGID_BASQUE = 0x042d, /* Basque */ 42 USB_LANGID_BELARUSSIAN = 0x0423, /* Belarussian */ 43 USB_LANGID_BENGALI = 0x0445, /* Bengali */ 44 USB_LANGID_BULGARIAN = 0x0402, /* Bulgarian */ 45 USB_LANGID_BURMESE = 0x0455, /* Burmese */ 46 USB_LANGID_CATALAN = 0x0403, /* Catalan */ 47 USB_LANGID_CHINESE_TAIWAN = 0x0404, /* Chinese (Taiwan) */ 48 USB_LANGID_CHINESE_PRC = 0x0804, /* Chinese (PRC = People Republic of Chinese) */ 49 USB_LANGID_CHINESE_HONG_KONG = 0x0c04, /* Chinese (Hong Kong) */ 50 USB_LANGID_CHINESE_SINGAPORE = 0x1004, /* Chinese (Singapore) */ 51 USB_LANGID_CHINESE_MACAU_SAR = 0x1404, /* Chinese (Macau SAR) */ 52 USB_LANGID_CROATIAN = 0x041a, /* Croatian */ 53 USB_LANGID_CZECH = 0x0405, /* Czech */ 54 USB_LANGID_DANISH = 0x0406, /* Danish */ 55 USB_LANGID_DUTCH_NETHERLANDS = 0x0413, /* Dutch (Netherlands) */ 56 USB_LANGID_DUTCH_BELGIUM = 0x0813, /* Dutch (Belgium) */ 57 USB_LANGID_ENGLISH_UNITED_STATES = 0x0409, /* English (United States) */ 58 USB_LANGID_ENGLISH_UNITED_KINGDOM = 0x0809, /* English (United Kingdom) */ 59 USB_LANGID_ENGLISH_AUSTRALIAN = 0x0c09, /* English (Australian) */ 60 USB_LANGID_ENGLISH_CANADIAN = 0x1009, /* English (Canadian) */ 61 USB_LANGID_ENGLISH_NEW_ZEALAND = 0x1409, /* English (New Zealand) */ 62 USB_LANGID_ENGLISH_IRELAND = 0x1809, /* English (Ireland) */ 63 USB_LANGID_ENGLISH_SOUTH_AFRICA = 0x1c09, /* English (South Africa) */ 64 USB_LANGID_ENGLISH_JAMAICA = 0x2009, /* English (Jamaica) */ 65 USB_LANGID_ENGLISH_CARIBBEAN = 0x2409, /* English (Caribbean) */ 66 USB_LANGID_ENGLISH_BELIZE = 0x2809, /* English (Belize) */ 67 USB_LANGID_ENGLISH_TRINIDAD = 0x2c09, /* English (Trinidad) */ 68 USB_LANGID_ENGLISH_ZIMBABWE = 0x3009, /* English (Zimbabwe) */ 69 USB_LANGID_ENGLISH_PHLIPPINES = 0x3409, /* English (Philippines) */ 70 USB_LANGID_ESTONIAN = 0x0425, /* Estonian */ 71 USB_LANGID_FAEROESE = 0x0438, /* Faeroese */ 72 USB_LANGID_FARSI = 0x0429, /* Farsi */ 73 USB_LANGID_FINNISH = 0x040b, /* Finnish */ 74 USB_LANGID_FRENCH_STANDARD = 0x040c, /* French (Standard) */ 75 USB_LANGID_FRENCH_BELGIAN = 0x080c, /* French (Belgian) */ 76 USB_LANGID_FRENCH_CANADIAN = 0x0c0c, /* French (Canadian) */ 77 USB_LANGID_FRENCH_SWITZERLAND = 0x100c, /* French (Switzerland) */ 78 USB_LANGID_FRENCH_LUXEMBOURG = 0x140c, /* French (Luxembourg) */ 79 USB_LANGID_FRENCH_MONACO = 0x180c, /* French (Monaco) */ 80 USB_LANGID_GEORGIAN = 0x0437, /* Georgian */ 81 USB_LANGID_GERMAN_STANDARD = 0x0407, /* German (Standard) */ 82 USB_LANGID_GERMAN_SWITZERLAND = 0x0807, /* German (Switzerland) */ 83 USB_LANGID_GERMAN_AUSTRIA = 0x0c07, /* German (Austria) */ 84 USB_LANGID_GERMAN_LUXEMBOURG = 0x1007, /* German (Luxembourg) */ 85 USB_LANGID_GERMAN_LIECHTENSTEIN = 0x1407, /* German (Liechtenstein) */ 86 USB_LANGID_GREEK = 0x0408, /* Greek */ 87 USB_LANGID_GUJARATI = 0x0447, /* Gujarati */ 88 USB_LANGID_HEBREW = 0x040d, /* Hebrew */ 89 USB_LANGID_HINDI = 0x0439, /* Hindi */ 90 USB_LANGID_HUNGARIAN = 0x040e, /* Hungarian */ 91 USB_LANGID_ICELANDIC = 0x040f, /* Icelandic */ 92 USB_LANGID_INDONESIAN = 0x0421, /* Indonesian */ 93 USB_LANGID_ITALIAN_STANDARD = 0x0410, /* Italian (Standard) */ 94 USB_LANGID_ITALIAN_SWITZERLAND = 0x0810, /* Italian (Switzerland) */ 95 USB_LANGID_JAPANESE = 0x0411, /* Japanese */ 96 USB_LANGID_KANNADA = 0x044b, /* Kannada */ 97 USB_LANGID_KASHMIRI_INDIA = 0x0860, /* Kashmiri (India) */ 98 USB_LANGID_KAZAKH = 0x043f, /* Kazakh */ 99 USB_LANGID_KONKANI = 0x0457, /* Konkani */ 100 USB_LANGID_KOREAN_JOHAB = 0x0412, /* Korean (Johab) */ 101 USB_LANGID_LATVIAN = 0x0426, /* Latvian */ 102 USB_LANGID_LITHUANIAN = 0x0427, /* Lithuanian */ 103 USB_LANGID_LITHUANIAN_CLASSIC = 0x0827, /* Lithuanian (Classic) */ 104 USB_LANGID_MACEDONIAN = 0x042f, /* Macedonian */ 105 USB_LANGID_MALAY_MALAYSIAN = 0x043e, /* Malay (Malaysian) */ 106 USB_LANGID_MALAY_BRUNEI_DARUSSALAM = 0x083e, /* Malay (Brunei Darussalam) */ 107 USB_LANGID_MALAYALAM = 0x044c, /* Malayalam */ 108 USB_LANGID_MANIPURI = 0x0458, /* Manipuri */ 109 USB_LANGID_MARATHI = 0x044e, /* Marathi */ 110 USB_LANGID_NEPALI_INDIA = 0x0861, /* Nepali (India) */ 111 USB_LANGID_NORWEGIAN_BOKMAL = 0x0414, /* Norwegian (Bokmal) */ 112 USB_LANGID_NORWEGIAN_NYNORSK = 0x0814, /* Norwegian (Nynorsk) */ 113 USB_LANGID_ORIYA = 0x0448, /* Oriya */ 114 USB_LANGID_POLISH = 0x0415, /* Polish */ 115 USB_LANGID_PORTUGUESE_BRAZIL = 0x0416, /* Portuguese (Brazil) */ 116 USB_LANGID_PORTUGUESE_STANDARD = 0x0816, /* Portuguese (Standard) */ 117 USB_LANGID_PUNJABI = 0x0446, /* Punjabi */ 118 USB_LANGID_ROMANIAN = 0x0418, /* Romanian */ 119 USB_LANGID_RUSSIAN = 0x0419, /* Russian */ 120 USB_LANGID_SANSKRIT = 0x044f, /* Sanskrit */ 121 USB_LANGID_SERBIAN_CYRILLIC = 0x0c1a, /* Serbian (Cyrillic) */ 122 USB_LANGID_SERBIAN_LATIN = 0x081a, /* Serbian (Latin) */ 123 USB_LANGID_SINDHI = 0x0459, /* Sindhi */ 124 USB_LANGID_SLOVAK = 0x041b, /* Slovak */ 125 USB_LANGID_SLOVENIAN = 0x0424, /* Slovenian */ 126 USB_LANGID_SPANNISH_TRADITIONAL_SORT= 0x040a, /* Spannish (Traditional Sort) */ 127 USB_LANGID_SPANNISH_MEXICAN = 0x080a, /* Spannish (Mexican) */ 128 USB_LANGID_SPANNISH_MODERN_SORT = 0x0c0a, /* Spannish (Modern Sort) */ 129 USB_LANGID_SPANNISH_GUATEMALA = 0x100a, /* Spannish (Guatemala) */ 130 USB_LANGID_SPANNISH_COSTA_RICA = 0x140a, /* Spannish (Costa Rica) */ 131 USB_LANGID_SPANNISH_PANAMA = 0x180a, /* Spannish (Panama) */ 132 USB_LANGID_SPANNISH_DOMINICAN_REPUBLIC = 0x1c0a, /* Spannish (Dominican Republic) */ 133 USB_LANGID_SPANNISH_VENEZUELA = 0x200a, /* Spannish (Venezuela) */ 134 USB_LANGID_SPANNISH_COLOMBIA = 0x240a, /* Spannish (Colombia) */ 135 USB_LANGID_SPANNISH_PERU = 0x280a, /* Spannish (Peru) */ 136 USB_LANGID_SPANNISH_ARGENTINA = 0x2c0a, /* Spannish (Argentina) */ 137 USB_LANGID_SPANNISH_ECUADOR = 0x300a, /* Spannish (Ecuador) */ 138 USB_LANGID_SPANNISH_CHILE = 0x340a, /* Spannish (Chile) */ 139 USB_LANGID_SPANNISH_URUGUAY = 0x380a, /* Spannish (Uruguay) */ 140 USB_LANGID_SPANNISH_PARAGUAY = 0x3c0a, /* Spannish (Paraguay) */ 141 USB_LANGID_SPANNISH_BOLIVIA = 0x400a, /* Spannish (Bolivia) */ 142 USB_LANGID_SPANNISH_EL_SALVADOR = 0x440a, /* Spannish (El Salvador) */ 143 USB_LANGID_SPANNISH_HONDURAS = 0x480a, /* Spannish (Honduras) */ 144 USB_LANGID_SPANNISH_NICARAGUA = 0x4c0a, /* Spannish (Nicaragua) */ 145 USB_LANGID_SPANNISH_PUERTO_RICO = 0x500a, /* Spannish (Puerto Rico) */ 146 USB_LANGID_SUTU = 0x0430, /* Sutu */ 147 USB_LANGID_SWAHILI_KENYA = 0x0441, /* Swahili (Kenya) */ 148 USB_LANGID_SWEDISH = 0x041d, /* Swedish */ 149 USB_LANGID_SWEDISH_FINLAND = 0x081d, /* Swedish (Finland) */ 150 USB_LANGID_TAMIL = 0x0449, /* Tamil */ 151 USB_LANGID_TATAR_TATARSTAN = 0x0444, /* Tatar (Tatarstan) */ 152 USB_LANGID_TELUGU = 0x044a, /* Telugu */ 153 USB_LANGID_THAI = 0x041e, /* Thai */ 154 USB_LANGID_TURKISH = 0x041f, /* Turkish */ 155 USB_LANGID_UKRAINIAN = 0x0422, /* Ukrainian */ 156 USB_LANGID_URDU_PAKISTAN = 0x0420, /* Urdu (Pakistan) */ 157 USB_LANGID_URDU_INDIA = 0x0820, /* Urdu (India) */ 158 USB_LANGID_UZBEK_LATIN = 0x0443, /* Uzbek (Latin) */ 159 USB_LANGID_UZBEK_CYRILLIC = 0x0843, /* Uzbek (Cyrillic) */ 160 USB_LANGID_VIETNAMESE = 0x042a, /* Vietnamese */ 167 161 168 USB_LANGID_INVALID = 0x0000 // Invalid LANG ID 162 USB_LANGID_HID_UDD = 0x04ff, /* HID (Usage Data Descriptor) */ 163 USB_LANGID_HID1 = 0xf0ff, /* HID (Vendor Defined 1) */ 164 USB_LANGID_HID2 = 0xf4ff, /* HID (Vendor Defined 2) */ 165 USB_LANGID_HID3 = 0xf8ff, /* HID (Vendor Defined 3) */ 166 USB_LANGID_HID4 = 0xfcff, /* HID (Vendor Defined 4) */ 167 168 USB_LANGID_INVALID = 0x0000 /* Invalid LANG ID */ 169 169 }; 170 170 171 #endif / / USB_LANGIDS_H171 #endif /* USB_LANGIDS_H */ 172 172 173 173 -
drivers/pcmcia/k_compat.h
73 73 74 74 /* Virtual memory mapping: this is somewhat inelegant, but lets us 75 75 use drop-in replacements for the Linux equivalents */ 76 / / #define PAGE_SIZE (0x1000)76 /* #define PAGE_SIZE (0x1000) */ 77 77 static inline void *ioremap(u_long base, u_long size) 78 78 { 79 79 char tag[B_OS_NAME_LENGTH]; … … 182 182 /* Interrupt handling */ 183 183 #define request_irq(i,h,f,n,d) install_io_interrupt_handler(i,h,d,0) 184 184 #define free_irq(i,h) remove_io_interrupt(i,h) 185 / /#define REQUEST_IRQ(i,h,f,n,d) install_io_interrupt_handler(i,h,d,0)186 / /#define FREE_IRQ(i,h,d) remove_io_interrupt(i,h)187 / /#define IRQ(i,d,r) (d)185 /*#define REQUEST_IRQ(i,h,f,n,d) install_io_interrupt_handler(i,h,d,0) */ 186 /*#define FREE_IRQ(i,h,d) remove_io_interrupt(i,h) */ 187 /*#define IRQ(i,d,r) (d) */ 188 188 #define IRQ 189 189 #define DEV_ID dev_id 190 190 #define NR_IRQS 16 -
drivers/pcmcia/config.h
8 8 #define CONFIG_PCI 1 9 9 #define CONFIG_CARDBUS 1 10 10 #undef PCMCIA_DEBUG 11 / /#define PCMCIA_DEBUG 1011 /*#define PCMCIA_DEBUG 10 */ 12 12 13 13 #endif /* _PCMCIA_CONFIG_H */ -
drivers/pcmcia/cs.h
444 444 bus_manager_info binfo; 445 445 int (*_CardServices)(int, ...); 446 446 int (*_MTDHelperEntry)(int, ...); 447 / / void (*_add_timer)(struct timer_list *);448 / / void (*_del_timer)(struct timer_list *);447 /* void (*_add_timer)(struct timer_list *); */ 448 /* void (*_del_timer)(struct timer_list *); */ 449 449 } cs_client_module_info; 450 450 #define CS_SOCKET_MODULE_NAME "bus_managers/pcmcia_cs/socket/v1" 451 451 typedef struct cs_socket_module_info { 452 452 bus_manager_info binfo; 453 453 int (*_register_ss_entry)(int, ss_entry_t); 454 454 void (*_unregister_ss_entry)(ss_entry_t); 455 / / void (*_add_timer)(struct timer_list *);456 / / void (*_del_timer)(struct timer_list *);455 /* void (*_add_timer)(struct timer_list *); */ 456 /* void (*_del_timer)(struct timer_list *); */ 457 457 int (*register_resource)(int, u_long, u_long); 458 458 int (*release_resource)(int, u_long, u_long); 459 459 int (*check_resource)(int, u_long, u_long); -
drivers/Select.h
13 13 typedef struct selectsync selectsync; 14 14 15 15 enum select_events { 16 B_SELECT_READ = 1, / / standard select() support16 B_SELECT_READ = 1, /* standard select() support */ 17 17 B_SELECT_WRITE, 18 18 B_SELECT_ERROR, 19 19 20 B_SELECT_PRI_READ, / / additional poll() support20 B_SELECT_PRI_READ, /* additional poll() support */ 21 21 B_SELECT_PRI_WRITE, 22 22 23 23 B_SELECT_HIGH_PRI_READ,