l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic cap server


From: ness
Subject: Re: Basic cap server
Date: Tue, 16 Aug 2005 10:34:52 +0200
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050813)

Hi
I found 1 more bug:
both postier and cap call bootstrap_final, but wortel doesn't reply. He
saves the thread id of cap (I guess you wished to save postier's to),
but doesn't use them. (So the main thread of postier/cap hangs at the
end of bootstrap_final, you can try this by inserting printfs
afterwards). However, I'm not sure wether they should receive those
caps, but if so, here's a patch (it corrects a slight mistake in
cap/cap.h, too, but not the README).

ChangeLogs:
wortel/ChangeLog
2005-08-16  Tom Bachmann  <address@hidden>

         * wortel.c (serve_bootstrap_reqests): Store
         the poster thread id and reply to postier and
         cap

cap/ChangeLog
2005-08-16  Tom Bachmann  <address@hidden>

         *cap.h: corrected comment for cap_buffer_free_server_object


--
-ness-
--- hurd-l4-cap-old/wortel/wortel.c     2005-08-16 09:21:55.218565160 +0200
+++ hurd-l4-cap-new/wortel/wortel.c     2005-08-16 09:19:03.229711440 +0200
@@ -944,6 +944,7 @@
   l4_thread_id_t bootstrap_final_physmem = l4_nilthread;
   l4_thread_id_t bootstrap_final_cap = l4_nilthread;
   l4_thread_id_t bootstrap_final_task = l4_nilthread;
+  l4_thread_id_t bootstrap_final_postier = l4_nilthread;
 
   /* This is to keep information about created task caps.  */
   unsigned int cur_task = (unsigned int) -1;
@@ -1198,7 +1199,7 @@
            {
              /* We have to reply later, when we started up the devive
                 access server and received the postier cap.  */
-             bootstrap_final_task = from;
+             bootstrap_final_postier = from;
 
              start_deva ();
            }
@@ -1213,6 +1214,15 @@
              l4_msg_load (msg);
              l4_reply (bootstrap_final_physmem);
 
+             /* Send the reply to cap's bootstrap final RPC.  */
+             l4_msg_clear (msg);
+             l4_msg_append_word (msg, mods[MOD_TASK].server_thread);
+             l4_msg_append_word (msg, mods[MOD_CAP].task_ctrl);
+             l4_msg_append_word (msg, mods[MOD_DEVA].server_thread);
+             l4_msg_append_word (msg, mods[MOD_CAP].deva);
+             l4_msg_load (msg);
+             l4_reply (bootstrap_final_cap);
+                       
              /* Send the reply to task's bootstrap final RPC.  */
              l4_msg_clear (msg);
              l4_msg_append_word (msg, mods[MOD_TASK].server_thread);
@@ -1222,6 +1232,15 @@
              l4_msg_load (msg);
              l4_reply (bootstrap_final_task);
 
+             /* Send the reply to postier's bootstrap final RPC.  */
+             l4_msg_clear (msg);
+             l4_msg_append_word (msg, mods[MOD_TASK].server_thread);
+             l4_msg_append_word (msg, mods[MOD_POSTIER].task_ctrl);
+             l4_msg_append_word (msg, mods[MOD_DEVA].server_thread);
+             l4_msg_append_word (msg, mods[MOD_POSTIER].deva);
+             l4_msg_load (msg);
+             l4_reply (bootstrap_final_postier);
+
              /* Send the reply to deva's bootstrap final RPC.  */
              l4_msg_append_word (msg, l4_nilthread);
              l4_msg_append_word (msg, 0);
--- hurd-l4-cap-old/cap/cap.h   2005-08-16 09:21:55.181570784 +0200
+++ hurd-l4-cap-new/cap/cap.h   2005-08-16 09:16:30.914866816 +0200
@@ -162,7 +162,7 @@
                                   server_object_t *r_server_object);
 
 
-/* Free a cap box.  */
+/* Free a cap server object.  */
 void
 cap_buffer_free_server_object (cap_buffer_t buffer, server_object_t object);
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]