[libj6] Take out explicit type IDs from object_types.inc
This caused errors when there were gaps, so don't allow explicit IDs, and just number types in order.
This commit is contained in:
@@ -16,7 +16,7 @@ static_assert(types_count <= (1 << kobject::koid_type_bits),
|
||||
"kobject::koid_type_bits cannot represent all kobject types");
|
||||
|
||||
static const char *type_names[] = {
|
||||
#define OBJECT_TYPE( name, val ) #name ,
|
||||
#define OBJECT_TYPE( name ) #name ,
|
||||
#include <j6/tables/object_types.inc>
|
||||
#undef OBJECT_TYPE
|
||||
nullptr
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
/// Types of kernel objects.
|
||||
enum class type : uint8_t
|
||||
{
|
||||
#define OBJECT_TYPE( name, val ) name = val,
|
||||
#define OBJECT_TYPE( name ) name ,
|
||||
#include <j6/tables/object_types.inc>
|
||||
#undef OBJECT_TYPE
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
OBJECT_TYPE( none, 0x00 )
|
||||
OBJECT_TYPE( none )
|
||||
|
||||
OBJECT_TYPE( system, 0x01 )
|
||||
OBJECT_TYPE( system )
|
||||
|
||||
OBJECT_TYPE( event, 0x02 )
|
||||
OBJECT_TYPE( event )
|
||||
|
||||
OBJECT_TYPE( endpoint, 0x04 )
|
||||
OBJECT_TYPE( mailbox, 0x05 )
|
||||
OBJECT_TYPE( endpoint )
|
||||
OBJECT_TYPE( mailbox )
|
||||
|
||||
OBJECT_TYPE( vma, 0x06 )
|
||||
OBJECT_TYPE( vma )
|
||||
|
||||
OBJECT_TYPE( process, 0x07 )
|
||||
OBJECT_TYPE( thread, 0x08 )
|
||||
OBJECT_TYPE( process )
|
||||
OBJECT_TYPE( thread )
|
||||
|
||||
@@ -35,7 +35,7 @@ typedef uint64_t j6_handle_t;
|
||||
typedef uint16_t j6_cap_t;
|
||||
|
||||
enum j6_object_type {
|
||||
#define OBJECT_TYPE( name, val ) j6_object_type_ ## name = val,
|
||||
#define OBJECT_TYPE( name ) j6_object_type_ ## name ,
|
||||
#include <j6/tables/object_types.inc>
|
||||
#undef OBJECT_TYPE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user