From a9b4c07566f15990a9aa755d6887e81b3b6d0471 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 25 May 2002 00:10:36 +0000 Subject: 2002-05-07 Roland McGrath * type.c (itMakeNaturalType): New function. (init_type): Use that instead of itMakeIntType for itWaitTimeType and itMsgOptionType--give them each their special typedef names. * routine.c (rtCheckArgTypes): Use itCheckNaturalType for rtMsgOption. --- type.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'type.c') diff --git a/type.c b/type.c index 9c786e2..2442391 100644 --- a/type.c +++ b/type.c @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990 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. */ @@ -718,6 +718,23 @@ itMakeCountType(void) return it; } +static ipc_type_t * +itMakeNaturalType(const char *name) +{ + ipc_type_t *it = itAlloc(); + + it->itName = name; + it->itInName = word_size_name; + it->itInNameStr = word_size_name_string; + it->itOutName = word_size_name; + it->itOutNameStr = word_size_name_string; + it->itSize = word_size_in_bits; + + itCalculateSizeInfo(it); + itCalculateNameInfo(it); + return it; +} + extern ipc_type_t * itMakeIntType() { @@ -825,8 +842,8 @@ init_type(void) itCalculateSizeInfo(itRealReplyPortType); itCalculateNameInfo(itRealReplyPortType); - itWaitTimeType = itMakeIntType(); - itMsgOptionType = itMakeIntType(); + itWaitTimeType = itMakeNaturalType("mach_msg_timeout_t"); + itMsgOptionType = itMakeNaturalType("mach_msg_option_t"); } /****************************************************** -- cgit v1.2.3