Closed
Bug 62877
Opened 24 years ago
Closed 24 years ago
OS/2 changes to allow PSM to work
Categories
(NSPR :: NSPR, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
4.2
People
(Reporter: jhpedemonte, Assigned: larryh)
Details
Attachments
(8 files)
14.63 KB,
patch
|
Details | Diff | Splinter Review | |
13.80 KB,
patch
|
Details | Diff | Splinter Review | |
14.76 KB,
patch
|
Details | Diff | Splinter Review | |
12.97 KB,
application/octet-stream
|
Details | |
22.22 KB,
patch
|
Details | Diff | Splinter Review | |
12.28 KB,
text/plain
|
Details | |
22.41 KB,
text/plain
|
Details | |
22.82 KB,
patch
|
Details | Diff | Splinter Review |
Several files need to be changed in NSPR to allow the PSM build to
work; most importantly, that of setting the loopback device to be
equal to 127.0.0.1. Patch included below.
Reporter | ||
Comment 1•24 years ago
|
||
These patches appear to have bad side effects, at least with the OS/2 emx+gtk
build I'm presently working on. Normal page loads, and particularly images,
slowed down horrendously and at times failed completely. Backed them out and
everything was back to normal. If that doesn't happen with VACPP, perhaps wrap
them in ifdef XP_OS2_VACPP for now until I can have a look in the debugger.
After culling all the cosmetic fixes from your patch, Javier, I end up with:
204c203
< fd_set wd, ex;
---
> fd_set wd;
229,231c227
< FD_ZERO(&ex);
< FD_SET(osfd, &ex);
< rv = select(osfd + 1, NULL, &wd, &ex, tvp);
---
> rv = select(osfd + 1, NULL, &wd, NULL, tvp);
241c237
< rv = select(socks, 0, 1, 1, lTimeout);
---
> rv = select(socks, 0, 1, 0, lTimeout);
246c242
< if (FD_ISSET(osfd, &ex))
---
> if (FD_ISSET(osfd, &wd))
256a254
> {
258,260d255
< else
< PR_SetError(PR_UNKNOWN_ERROR, 0);
< return -1;
262,265c257,259
< if (FD_ISSET(osfd, &wd))
< {
< /* it's connected */
< return 0;
---
> else
> return 0; /* it's connected */
>
266a261,262
> else
> return -1;
267a264,266
> if (socks[0] == osfd)
> {
> len = sizeof(err);
273a273,281
>
> if (err != 0)
> {
> _PR_MD_MAP_CONNECT_ERROR(err);
> return -1;
> }
> else
> return 0; /* it's connected */
> }
275c283
< return 0; /* It's connected ! */
---
> return -1;
Something in these 50-odd lines is most likely the culprit.
h~
Reporter | ||
Comment 4•24 years ago
|
||
the reason i changed those lines is because select (the bsd version, not the
os/2 version) on os/2 sets the write bit if connect comes back with EWOULDBLOCK.
however, on win32, select would set the exception bit in this case. so this
file was originally written by copying the win32 code, but it wasn't working
since the exception bit never gets set on os/2 (at least , in this case). so i
removed the exception bit and just had the code check the write bit. does emx
use a different version of select?
emx provides its own implementation of select() and a quick scan of the src
shows nothing obvious to suggest bits aren't set as specified in the args.
Also, EM is very explicit about any such limitations in his software and, and
there's no mention of it in the docs. Since the problem seems confined to
VAC++'s select(), just #ifdef your fix and let emx use the existing code.
Reporter | ||
Comment 6•24 years ago
|
||
Reporter | ||
Comment 7•24 years ago
|
||
Comment 8•24 years ago
|
||
Comment 9•24 years ago
|
||
this attach is .ZIP file with _os2.h, os2sock.c and os2poll.c
Reporter | ||
Comment 10•24 years ago
|
||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: P3 → P1
Comment 11•24 years ago
|
||
Comment 12•24 years ago
|
||
os2sock.c must be changed too: use XP_OS2_VACPP code for EMX too.
so, replace XP_OS2_VACPP by XP_OS2 or clean up it.
Comment 13•24 years ago
|
||
Comment 14•24 years ago
|
||
Confirming that the latest nspr patches (#24813, 25253, 25343) work fine here
with an emx build of the 0.8 src. Thanks for the improved select(), Dimitry.
Comment 15•24 years ago
|
||
EMX-PSM is still not working on SMP machines... I can't fix this until someone
donate SMP system for me (hehe). VAC-PSM works on SMP.
Except SMP issue, everything works fine.
Updated•24 years ago
|
Target Milestone: --- → 4.2
Comment 16•24 years ago
|
||
Assigned the bug to Larry.
Which patches should we review and merge?
Assignee: wtc → larryh
Status: ASSIGNED → NEW
Comment 17•24 years ago
|
||
#24813 for the two headers, 25253 and 25343 (the latter two override the rest
of the first).
Reporter | ||
Comment 18•24 years ago
|
||
Thanks for answering that, Henry. Does this all work now for EMX?
Comment 19•24 years ago
|
||
Yes, both for Dimitry and here.
Comment 20•24 years ago
|
||
Thanks. I will review those patches, and Larry will pick up where
I left off next Monday. (I'm going on sabbatical on Saturday.)
Comment 21•24 years ago
|
||
In patch #24813, you added the following to _os2.h:
+#include <sys/builtin.h>
+#include <sys/smutex.h>
+static _smutex _md_shm_lock = 0;
Is this really necessary? I don't see _md_shm_lock get used
anywhere. The reason I asked is that it is unusual to *define*
a static variable in a .h file as we will have an instance of
that static variable in every file that includes _os2.h.
Comment 22•24 years ago
|
||
Comment 23•24 years ago
|
||
I checked in the combined patch (id=26597) on the tip and
NSPRPUB_CLIENT_BRANCH of NSPR. Please verify that I merged
the patches correctly.
I'd also like to know if the following can be removed from _os2.h:
+#include <sys/builtin.h>
+#include <sys/smutex.h>
+static _smutex _md_shm_lock = 0;
Thanks!
Comment 24•24 years ago
|
||
Yes. I don't see it used anywhere. Likely just something Dimitry was playing
with.
Comment 25•24 years ago
|
||
OK, I deleted those three lines of unused code from _os2.h.
Marked the bug fixed.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•