This machine mirrors various open-source projects.
20 Gbit/s uplink.
If there are any issues or you want another project mirrored, please contact
mirror-service -=AT=- netcologne DOT de !
00001 /*===-- runtime/commart.h -------------------------------------------------=== 00002 * 00003 * This file is distributed under the MIT license. See LICENSE.txt for details. 00004 * 00005 * Copyright (C) 2009-2010, Stephen Wilson 00006 * 00007 *===----------------------------------------------------------------------===*/ 00008 00009 #ifndef COMMA_RUNTIME_COMMART_HDR_GUARD 00010 #define COMMA_RUNTIME_COMMART_HDR_GUARD 00011 00012 #include <stdint.h> 00013 00014 /* 00015 * This file provides the public interface to the Comma runtime library. 00016 */ 00017 00018 /* 00019 * Allocates the given number of bytes respecting the given alignment. 00020 */ 00021 void *_comma_alloc(uint64_t bytes, uint32_t align); 00022 00023 /* 00024 * Opaque type representing a Comma exeception object. 00025 */ 00026 typedef char **comma_exinfo_t; 00027 00028 /* 00029 * The following enumeration defines the set of standard system-level exceptions 00030 * which the runtime might raise. 00031 */ 00032 typedef enum { 00033 COMMA_CONSTRAINT_ERROR_E, 00034 COMMA_PROGRAM_ERROR_E, 00035 COMMA_ASSERTION_ERROR_E 00036 } comma_exception_id; 00037 00038 /* 00039 * Returns the unique exception object corresponding to the given id. 00040 */ 00041 comma_exinfo_t _comma_get_exception(comma_exception_id id); 00042 00043 /* 00044 * Allocates and raises an expection with an identity defined by the provided 00045 * info and associates it with the given message. The message may be null. 00046 */ 00047 void _comma_raise_exception(comma_exinfo_t info, 00048 const char *file_name, uint32_t lineno, 00049 const char *message); 00050 00051 /* 00052 * Allocates and raises an expection with an identity defined by the provided 00053 * info and associates it with the given message. The message may be a null 00054 * pointer or a string of the given length. 00055 */ 00056 void _comma_raise_nexception(comma_exinfo_t info, 00057 const char *file_name, uint32_t lineno, 00058 const char *message, uint32_t length); 00059 00060 /* 00061 * Routine to raise a specific system exception. 00062 */ 00063 void _comma_raise_system(uint32_t id, 00064 const char *file_name, uint32_t lineno, 00065 const char *message); 00066 00067 00068 #endif