[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wrong MIG generated headers
From: |
Joan Lledó |
Subject: |
Wrong MIG generated headers |
Date: |
Sat, 11 Sep 2021 11:26:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
Hi,
I'm having a weird issue trying to add a new interface to gnumach. I'm
using this mach4.defs:
----------------------------------------------
/*
* Mach Operating System
* Copyright (c) 1994,1993,1992 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
* Matchmaker definitions file for Mach4 kernel interface.
*/
subsystem
#if KERNEL_SERVER
KernelServer
#endif /* KERNEL_SERVER */
#if KERNEL_USER
KernelUser
#endif /* KERNEL_USER */
mach4 4000;
#include <mach/std_types.defs>
#include <mach/mach_types.defs>
#ifdef MACH_PCSAMPLE
type sampled_pc_t = struct[3] of natural_t;
type sampled_pc_array_t = array[*:512] of sampled_pc_t;
type sampled_pc_seqno_t = unsigned;
type sampled_pc_flavor_t = natural_t;
routine task_enable_pc_sampling(
host : task_t;
out tick : int; /* sample frequency in usecs */
flavor : sampled_pc_flavor_t );
routine task_disable_pc_sampling(
host : task_t;
out samplecnt : int);
routine task_get_sampled_pcs(
host : task_t;
inout seqno : sampled_pc_seqno_t;
out sampled_pcs : sampled_pc_array_t);
routine thread_enable_pc_sampling(
host : thread_t;
out tick : int; /* sample frequency in usecs*/
flavor : sampled_pc_flavor_t );
routine thread_disable_pc_sampling(
host : thread_t;
out samplecnt : int);
routine thread_get_sampled_pcs(
host : thread_t;
inout seqno : sampled_pc_seqno_t;
out sampled_pcs : sampled_pc_array_t);
skip /* pc_sampling reserved 1*/;
skip /* pc_sampling reserved 2*/;
skip /* pc_sampling reserved 3*/;
skip /* pc_sampling reserved 4*/;
#else
skip; /* task_enable_pc_sampling */
skip; /* task_disable_pc_sampling */
skip; /* task_get_sampled_pcs */
skip; /* thread_enable_pc_sampling */
skip; /* thread_disable_pc_sampling */
skip; /* thread_get_sampled_pcs */
skip /* pc_sampling reserved 1*/;
skip /* pc_sampling reserved 2*/;
skip /* pc_sampling reserved 3*/;
skip /* pc_sampling reserved 4*/;
#endif
/* Create a new proxy memory object from [START;START+LEN) in the
given memory object OBJECT at OFFSET in the new object with the maximum
protection MAX_PROTECTION and return it in *PORT. */
type vm_offset_array_t = array[*:1024] of vm_offset_t;
routine memory_object_create_proxy(
task : ipc_space_t;
max_protection : vm_prot_t;
object : memory_object_array_t =
array[*:1024] of mach_port_send_t;
offset : vm_offset_array_t;
start : vm_offset_array_t;
len : vm_offset_array_t;
out proxy : mach_port_t);
/* Get the pager where the given address is mapped to */
routine vm_pager(
task : ipc_space_t;
address : vm_address_t;
out pager : mach_port_t);
------------------------------------------------------------------
Which is the same but with my new interface at the end. But when I
compile glibc to get my new lubmachuser, I find it has generated this
mach4.h:
-----------------------------------------------------------------
#ifndef _mach4_user_
#define _mach4_user_
/* Module mach4 */
#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/message.h>
#include <mach/std_types.h>
#include <mach/mach_types.h>
/* Routine task_enable_pc_sampling */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t __task_enable_pc_sampling
(
mach_port_t host,
int *tick,
sampled_pc_flavor_t flavor
);
/* Routine task_disable_pc_sampling */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t __task_disable_pc_sampling
(
mach_port_t host,
int *samplecnt
);
/* Routine task_get_sampled_pcs */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t __task_get_sampled_pcs
(
mach_port_t host,
sampled_pc_seqno_t *seqno,
sampled_pc_array_t sampled_pcs,
mach_msg_type_number_t *sampled_pcsCnt
);
/* Routine thread_enable_pc_sampling */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t __thread_enable_pc_sampling
(
mach_port_t host,
int *tick,
sampled_pc_flavor_t flavor
);
/* Routine thread_disable_pc_sampling */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t __thread_disable_pc_sampling
(
mach_port_t host,
int *samplecnt
);
/* Routine thread_get_sampled_pcs */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t __thread_get_sampled_pcs
(
mach_port_t host,
sampled_pc_seqno_t *seqno,
sampled_pc_array_t sampled_pcs,
mach_msg_type_number_t *sampled_pcsCnt
);
/* Routine memory_object_create_proxy */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t __memory_object_create_proxy
(
mach_port_t task,
vm_prot_t max_protection,
const memory_object_array_t object,
mach_msg_type_name_t objectPoly,
mach_msg_type_number_t objectCnt,
const vm_offset_array_t offset,
mach_msg_type_number_t offsetCnt,
const vm_offset_array_t start,
mach_msg_type_number_t startCnt,
const vm_offset_array_t len,
mach_msg_type_number_t lenCnt,
mach_port_t *proxy
);
/* Routine vm_pager */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t __vm_pager
(
mach_port_t task,
vm_address_t address,
mach_port_t *pager
);
/* Module mach4 */
#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/message.h>
#include <mach/std_types.h>
#include <mach/mach_types.h>
/* Routine task_enable_pc_sampling */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t task_enable_pc_sampling
(
mach_port_t host,
int *tick,
sampled_pc_flavor_t flavor
);
/* Routine task_disable_pc_sampling */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t task_disable_pc_sampling
(
mach_port_t host,
int *samplecnt
);
/* Routine task_get_sampled_pcs */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t task_get_sampled_pcs
(
mach_port_t host,
sampled_pc_seqno_t *seqno,
sampled_pc_array_t sampled_pcs,
mach_msg_type_number_t *sampled_pcsCnt
);
/* Routine thread_enable_pc_sampling */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t thread_enable_pc_sampling
(
mach_port_t host,
int *tick,
sampled_pc_flavor_t flavor
);
/* Routine thread_disable_pc_sampling */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t thread_disable_pc_sampling
(
mach_port_t host,
int *samplecnt
);
/* Routine thread_get_sampled_pcs */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t thread_get_sampled_pcs
(
mach_port_t host,
sampled_pc_seqno_t *seqno,
sampled_pc_array_t sampled_pcs,
mach_msg_type_number_t *sampled_pcsCnt
);
/* Routine memory_object_create_proxy */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t memory_object_create_proxy
(
mach_port_t task,
vm_prot_t max_protection,
const memory_object_array_t object,
mach_msg_type_name_t objectPoly,
mach_msg_type_number_t objectCnt,
const vm_offset_array_t offset,
mach_msg_type_number_t offsetCnt,
const vm_offset_array_t start,
mach_msg_type_number_t startCnt,
const vm_offset_array_t len,
mach_msg_type_number_t lenCnt,
mach_port_t *proxy
);
/* Routine vm_pager */
#ifdef mig_external
mig_external
#else
extern
#endif
kern_return_t vm_pager
(
mach_port_t task,
vm_address_t address,
mach_port_t *pager
);
#endif /* not defined(_mach4_user_) */
--------------------------------------------------------------------
Note the additional parameter *mach_msg_type_name_t objectPoly* in
memory_object_create_proxy. I don't know why is it there but I can't
compile the pci arbiter anymore because of that. What can I do?
- Wrong MIG generated headers,
Joan Lledó <=