summaryrefslogtreecommitdiff
path: root/trans.h
diff options
context:
space:
mode:
authorSergiu Ivanov <unlimitedscolobb@gmail.com>2009-04-13 01:03:40 +0300
committerSergiu Ivanov <unlimitedscolobb@gmail.com>2009-04-13 01:03:40 +0300
commitc9110f9c7d71fa9b157540a7aa2ade7f34b79968 (patch)
tree86723a412757f6d44ac60e8efec921fd14777987 /trans.h
parent0a5fcd403943fbbdc0a2ba35283f1135f97c48dc (diff)
nsmux can shutdown all dynamic translators on exit
Now nsmux can shutdown all of its dynamic translators on exit, thus doing sufficient cleanup. One can tell nsmux to shutdown dynamic translators using the ``--recursive'' option to settrans. Note that because fsys_goaway returns immediately as the RPC is processed, while the receiver may still remain in memory, doing something like settrans -g --recursive foo where nsmux is sitting on foo will almost always result in a ``Server busy'' error message. The reason is that libnetfs counts how many open ports to its nodes there are at shutdown and in most cases it does the check *before* the dynamic translators manage to drop their references. Therefore, the aforementioned command gracefully kills all dynamic translators. Invoked the second time, this command will shutdown nsmux, too. Immediate shutdown with killing dynamic translators can be achieved via settrans -gf --recursive foo
Diffstat (limited to 'trans.h')
-rw-r--r--trans.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/trans.h b/trans.h
index 86e21c9d6..e28060f5e 100644
--- a/trans.h
+++ b/trans.h
@@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.*/
/*---------------------------------------------------------------------------*/
-#ifndef __DEBUG_H__
-#define __DEBUG_H__
+#ifndef __TRANS_H__
+#define __TRANS_H__
/*---------------------------------------------------------------------------*/
#include <hurd.h>
@@ -35,7 +35,7 @@
struct trans_el
{
/*the control port to the translator */
- mach_port_t cntl;
+ fsys_t cntl;
/*the next and the previous elements in the list */
struct trans_el * next, * prev;
@@ -55,7 +55,7 @@ extern trans_el_t * dyntrans;
/*Adds a translator control port to the list of ports. One should use
only this function to add a new element to the list of ports. */
error_t
-trans_register (mach_port_t cntl);
+trans_register (fsys_t cntl, trans_el_t ** new_trans);
/*---------------------------------------------------------------------------*/
/*Removes a translator control port from the list of ports. One should
use only this function to remove an element from the list of