From 419a283fa2981c47f2a117fa56f268c0ae5b5989 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 27 Sep 2015 23:33:23 +0200 Subject: trans/ifsock: convert to trivfs dynamic classes and buckets libtrivfs contains two ways of managing more than one port class and bucket. There is the old way of using a statically allocated array with explicit length, and the new way with dynamically allocated vectors. Converting all users to the new way of handling multiple classes and/or buckets, we can simplify the code in libtrivfs. In many cases, the code will be simpler and more expressive for the user. This also fixes a mild bug. The classes and buckets given to `trivfs_startup' end up in the dynamic vectors too, making the object lookup code use the more complicated code path. * trans/ifsock.c: Convert to dynamic classes and buckets. --- trans/ifsock.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'trans') diff --git a/trans/ifsock.c b/trans/ifsock.c index af2376aad..13a21338b 100644 --- a/trans/ifsock.c +++ b/trans/ifsock.c @@ -59,11 +59,6 @@ int trivfs_support_exec = 0; int trivfs_allow_open = 0; -struct port_class *trivfs_protid_portclasses[1]; -struct port_class *trivfs_cntl_portclasses[1]; -int trivfs_protid_nportclasses = 1; -int trivfs_cntl_nportclasses = 1; - int demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp) { @@ -85,8 +80,6 @@ main (int argc, char **argv) control_class = ports_create_class (trivfs_clean_cntl, 0); node_class = ports_create_class (trivfs_clean_protid, 0); port_bucket = ports_create_bucket (); - trivfs_protid_portclasses[0] = node_class; - trivfs_cntl_portclasses[0] = control_class; task_get_bootstrap_port (mach_task_self (), &bootstrap); if (bootstrap == MACH_PORT_NULL) -- cgit v1.2.3