Closed Bug 135448 Opened 22 years ago Closed 22 years ago

Remove a level of code to make semaphores faster

Categories

(NSPR :: NSPR, defect, P1)

Other
OS/2
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mkaply, Assigned: wtc)

Details

Attachments

(1 file)

This is an update to our RAM semaphore code.

It removes one level of function direction to speed things up a bit.

diff attached.
This code does two things.

1. Remove level of indirection.

2. Optimize assembly code (short jumps, better alignment)
Comment on attachment 77652 [details] [diff] [review]
Remove a level of indirection, cleanup assembly

Michael, just a nit.  In os2vacpp.asm, you don't need to
move the 'page ,132' statement to tbe beginning of the
file, right?
That move of page, 132 was just a mistype when I grabbed a new version of the 
file.

It does not need to move.
Comment on attachment 77652 [details] [diff] [review]
Remove a level of indirection, cleanup assembly

r=wtc, excluding this change:

>Index: src/md/os2/os2vacpp.asm
>===================================================================
>RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/os2/os2vacpp.asm,v
>retrieving revision 1.1.4.1
>diff -u -r1.1.4.1 os2vacpp.asm
>--- src/md/os2/os2vacpp.asm	16 Feb 2002 02:25:51 -0000	1.1.4.1
>+++ src/md/os2/os2vacpp.asm	4 Apr 2002 17:11:17 -0000
>@@ -1,3 +1,4 @@
>+        page ,132
> COMMENT | -*- Mode: asm; tab-width: 8; c-basic-offset: 4 -*-
>         The contents of this file are subject to the Mozilla Public
>         License Version 1.1 (the "License"); you may not use this file
>@@ -39,7 +40,6 @@
>           implementation to hold the TID:PID in the lower 31 bits and the lock
>           bit in the high bit
>         |
>-        page ,132
> 
>         .486P
>         ASSUME  CS:FLAT,  DS:FLAT,  SS:FLAT,  ES:FLAT,  FS:FLAT
Attachment #77652 - Flags: review+
The patch has been checked into the NSPRPUB_PRE_4_2_CLIENT_BRANCH
and the tip of NSPR.

Michael, please get drivers' approval if you want the fix in the
MOZILLA_1_0_0_BRANCH.
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → 4.2.1
Comment on attachment 77652 [details] [diff] [review]
Remove a level of indirection, cleanup assembly

a=asa (on behalf of drivers) for checkin to the 1.0 branch
Attachment #77652 - Flags: approval+
Fix checked into the MOZILLA_1_0_0_BRANCH.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Code is in - verify
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: