mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@transmeta.com>
Subject: [PATCH] fast reader/writer lock for gettimeofday 2.5.30 - addendum apm.c
Date: 13 Aug 2002 09:43:46 -0700	[thread overview]
Message-ID: <1029257026.6437.5.camel@dell_ss3.pdx.osdl.net> (raw)
In-Reply-To: <1029195577.1978.22.camel@dell_ss3.pdx.osdl.net>

Missed this part which updated i386 apm.c
--- linux-2.5/arch/i386/kernel/apm.c	Mon Aug 12 10:17:59 2002
+++ linux-2.5.exp/arch/i386/kernel/apm.c	Mon Aug 12 17:25:57 2002
@@ -215,6 +215,7 @@
 #include <linux/pm.h>
 #include <linux/kernel.h>
 #include <linux/smp_lock.h>
+#include <linux/frlock.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -222,7 +223,7 @@
 
 #include <linux/sysrq.h>
 
-extern rwlock_t xtime_lock;
+extern frlock_t xtime_lock;
 extern spinlock_t i8253_lock;
 extern unsigned long get_cmos_time(void);
 extern void machine_real_restart(unsigned char *, int);
@@ -1190,7 +1191,7 @@
 		printk(KERN_CRIT "apm: suspend was vetoed, but suspending anyway.\n");
 	}
 	/* serialize with the timer interrupt */
-	write_lock_irq(&xtime_lock);
+	fr_write_lock_irq(&xtime_lock);
 
 	/* protect against access to timer chip registers */
 	spin_lock(&i8253_lock);
@@ -1202,7 +1203,7 @@
 	ignore_normal_resume = 1;
 
 	spin_unlock(&i8253_lock);
-	write_unlock_irq(&xtime_lock);
+	fr_write_unlock_irq(&xtime_lock);
 
 	if (err == APM_NO_ERROR)
 		err = APM_SUCCESS;
@@ -1227,10 +1228,10 @@
 	int	err;
 
 	/* serialize with the timer interrupt */
-	write_lock_irq(&xtime_lock);
+	fr_write_lock_irq(&xtime_lock);
 	/* If needed, notify drivers here */
 	get_time_diff();
-	write_unlock_irq(&xtime_lock);
+	fr_write_unlock_irq(&xtime_lock);
 
 	err = set_system_power_state(APM_STATE_STANDBY);
 	if ((err != APM_SUCCESS) && (err != APM_NO_ERROR))
@@ -1319,9 +1320,9 @@
 			ignore_bounce = 1;
 			if ((event != APM_NORMAL_RESUME)
 			    || (ignore_normal_resume == 0)) {
-				write_lock_irq(&xtime_lock);
+				fr_write_lock_irq(&xtime_lock);
 				set_time();
-				write_unlock_irq(&xtime_lock);
+				fr_write_unlock_irq(&xtime_lock);
 				pm_send_all(PM_RESUME, (void *)0);
 				queue_event(event, NULL);
 			}
@@ -1336,9 +1337,9 @@
 			break;
 
 		case APM_UPDATE_TIME:
-			write_lock_irq(&xtime_lock);
+			fr_write_lock_irq(&xtime_lock);
 			set_time();
-			write_unlock_irq(&xtime_lock);
+			fr_write_unlock_irq(&xtime_lock);
 			break;
 
 		case APM_CRITICAL_SUSPEND:


  reply	other threads:[~2002-08-13 16:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-12 23:39 [PATCH] fast reader/writer lock for gettimeofday 2.5.30 Stephen Hemminger
2002-08-13 16:43 ` Stephen Hemminger [this message]
2002-08-13 16:46 ` [PATCH] fast reader/writer lock for gettimeofday 2.5.30 - ia64 Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1029257026.6437.5.camel@dell_ss3.pdx.osdl.net \
    --to=shemminger@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®