OSSP CVS Repository

ossp - Check-in [2650]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2650
Date: 2002-Oct-23 15:55:49 (local)
2002-Oct-23 13:55:49 (UTC)
User:rse
Branch:
Comment: Matthew Mondor <mmondor@gobot.ca> wrote:

> I noticed that pth_msgport_create(), although inspired from the AmigaOS > API, does not support NULL for port identifyer, which would be very > useful for thread-specific private message ports (mmftpd uses those and > unfortunately currently has to generate unique strings to create ports). > AmigaOS had this functionality...

So, make him happy and allow NULL from now on, too.

Tickets:
Inspections:
Files:
ossp-pkg/pth/ChangeLog      1.575 -> 1.576     5 inserted, 0 deleted
ossp-pkg/pth/pth.pod      1.154 -> 1.155     4 inserted, 3 deleted
ossp-pkg/pth/pth_msg.c      1.22 -> 1.23     1 inserted, 3 deleted

ossp-pkg/pth/ChangeLog 1.575 -> 1.576

--- ChangeLog    2002/10/20 16:22:03     1.575
+++ ChangeLog    2002/10/23 13:55:49     1.576
@@ -21,6 +21,11 @@
 
   Changes between 1.4.1 and 1.5.0 (27-Jan-2002 to xx-Oct-2002)
 
+   *) Allow a NULL name for pth_msgport_create() in order to
+      support locally scoped message ports which are not searched via
+      pth_msgport_find().
+      [Ralf S. Engelschall, Matthew Mondor <mmondor@gobot.ca>]
+
    *) Added "hard syscall mapping" support for using 
       SYS___sigprocmask14 instead of SYS_sigprocmask on NetBSD.
       [Nick Hudson <skrll@netbsd.org>]


ossp-pkg/pth/pth.pod 1.154 -> 1.155

--- pth.pod      2002/10/15 20:34:22     1.154
+++ pth.pod      2002/10/23 13:55:49     1.155
@@ -1266,9 +1266,10 @@
 
 =item pth_msgport_t B<pth_msgport_create>(const char *I<name>);
 
-This returns a pointer to a new message port with name I<name>. The I<name>
-can be used by other threads via pth_msgport_find(3) to find the message port
-in case they do not know directly the pointer to the message port.
+This returns a pointer to a new message port. If name I<name>
+is not C<NULL>, the I<name> can be used by other threads via
+pth_msgport_find(3) to find the message port in case they do not know
+directly the pointer to the message port.
 
 =item void B<pth_msgport_destroy>(pth_msgport_t I<mp>);
 


ossp-pkg/pth/pth_msg.c 1.22 -> 1.23

--- pth_msg.c    2002/01/27 11:03:40     1.22
+++ pth_msg.c    2002/10/23 13:55:49     1.23
@@ -46,9 +46,7 @@
 {
     pth_msgport_t mp;
 
-    /* check input */
-    if (name == NULL)
-        return_errno(NULL, EINVAL);
+    /* Notice: "name" is allowed to be NULL */
 
     /* allocate message port structure */
     if ((mp = (pth_msgport_t)malloc(sizeof(struct pth_msgport_st))) == NULL)

CVSTrac 2.0.1