Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/dev/sysmon Remove stray CR characters introduced in t...
details: https://anonhg.NetBSD.org/src/rev/efa4b9e1a759
branches: netbsd-6
changeset: 775369:efa4b9e1a759
user: riz <riz%NetBSD.org@localhost>
date: Fri Oct 19 17:28:01 2012 +0000
description:
Remove stray CR characters introduced in ticket #544. From pgoyette.
diffstat:
sys/dev/sysmon/sysmon_envsys.c | 6 +-
sys/dev/sysmon/sysmon_envsys_events.c | 112 +++++++++++++++++-----------------
sys/dev/sysmon/sysmon_envsysvar.h | 4 +-
3 files changed, 61 insertions(+), 61 deletions(-)
diffs (192 lines):
diff -r 2dbbd4d48be8 -r efa4b9e1a759 sys/dev/sysmon/sysmon_envsys.c
--- a/sys/dev/sysmon/sysmon_envsys.c Wed Oct 17 22:41:41 2012 +0000
+++ b/sys/dev/sysmon/sysmon_envsys.c Fri Oct 19 17:28:01 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys.c,v 1.117.8.1 2012/10/17 21:06:56 riz Exp $ */
+/* $NetBSD: sysmon_envsys.c,v 1.117.8.2 2012/10/19 17:28:01 riz Exp $ */
/*-
* Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.117.8.1 2012/10/17 21:06:56 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.117.8.2 2012/10/19 17:28:01 riz Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -602,7 +602,7 @@
/*
* remove it and decrement the sensors count.
*/
- sme_event_unregister_sensor(sme, edata);
+ sme_event_unregister_sensor(sme, edata);
TAILQ_REMOVE(&sme->sme_sensors_list, edata, sensors_head);
sme->sme_nsensors--;
sysmon_envsys_release(sme, true);
diff -r 2dbbd4d48be8 -r efa4b9e1a759 sys/dev/sysmon/sysmon_envsys_events.c
--- a/sys/dev/sysmon/sysmon_envsys_events.c Wed Oct 17 22:41:41 2012 +0000
+++ b/sys/dev/sysmon/sysmon_envsys_events.c Fri Oct 19 17:28:01 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys_events.c,v 1.98.8.2 2012/10/17 21:21:43 riz Exp $ */
+/* $NetBSD: sysmon_envsys_events.c,v 1.98.8.3 2012/10/19 17:28:01 riz Exp $ */
/*-
* Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.98.8.2 2012/10/17 21:21:43 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.98.8.3 2012/10/19 17:28:01 riz Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -77,8 +77,8 @@
static bool sme_battery_critical(envsys_data_t *);
static bool sme_acadapter_check(void);
-static void sme_remove_event(sme_event_t *, struct sysmon_envsys *);
-
+static void sme_remove_event(sme_event_t *, struct sysmon_envsys *);
+
/*
* sme_event_register:
*
@@ -341,8 +341,8 @@
DPRINTF(("%s: event %s %d removed (%s)\n", __func__,
see->see_pes.pes_sensname, see->see_type,
sme->sme_name));
- sme_remove_event(see, sme);
-
+ sme_remove_event(see, sme);
+
evcounter--;
}
}
@@ -390,56 +390,56 @@
DPRINTF(("%s: removed dev=%s sensor=%s type=%d\n",
__func__, see->see_pes.pes_dvname, sensor, type));
-
- sme_remove_event(see, sme);
-
- mutex_exit(&sme->sme_mtx);
- return 0;
-}
-
-/*
- * sme_event_unregister_sensor:
- *
- * + Unregisters any event associated with a specific sensor
- * The caller must already own the sme_mtx.
- */
-int
-sme_event_unregister_sensor(struct sysmon_envsys *sme, envsys_data_t *edata)
-{
- sme_event_t *see;
- bool found = false;
-
- KASSERT(mutex_owned(&sme->sme_mtx));
- LIST_FOREACH(see, &sme->sme_events_list, see_list) {
- if (see->see_edata == edata) {
- found = true;
- break;
- }
- }
- if (!found)
- return EINVAL;
-
- /*
- * Wait for the event to finish its work, remove from the list
- * and release resouces.
- */
- while (see->see_flags & SEE_EVENT_WORKING)
- cv_wait(&sme->sme_condvar, &sme->sme_mtx);
-
- DPRINTF(("%s: removed dev=%s sensor=%s\n",
- __func__, see->see_pes.pes_dvname, edata->desc));
-
- sme_remove_event(see, sme);
-
- return 0;
-}
-
-static void
-sme_remove_event(sme_event_t *see, struct sysmon_envsys *sme)
-{
-
- KASSERT(mutex_owned(&sme->sme_mtx));
-
+
+ sme_remove_event(see, sme);
+
+ mutex_exit(&sme->sme_mtx);
+ return 0;
+}
+
+/*
+ * sme_event_unregister_sensor:
+ *
+ * + Unregisters any event associated with a specific sensor
+ * The caller must already own the sme_mtx.
+ */
+int
+sme_event_unregister_sensor(struct sysmon_envsys *sme, envsys_data_t *edata)
+{
+ sme_event_t *see;
+ bool found = false;
+
+ KASSERT(mutex_owned(&sme->sme_mtx));
+ LIST_FOREACH(see, &sme->sme_events_list, see_list) {
+ if (see->see_edata == edata) {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ return EINVAL;
+
+ /*
+ * Wait for the event to finish its work, remove from the list
+ * and release resouces.
+ */
+ while (see->see_flags & SEE_EVENT_WORKING)
+ cv_wait(&sme->sme_condvar, &sme->sme_mtx);
+
+ DPRINTF(("%s: removed dev=%s sensor=%s\n",
+ __func__, see->see_pes.pes_dvname, edata->desc));
+
+ sme_remove_event(see, sme);
+
+ return 0;
+}
+
+static void
+sme_remove_event(sme_event_t *see, struct sysmon_envsys *sme)
+{
+
+ KASSERT(mutex_owned(&sme->sme_mtx));
+
LIST_REMOVE(see, see_list);
/*
* So the events list is empty, we'll do the following:
diff -r 2dbbd4d48be8 -r efa4b9e1a759 sys/dev/sysmon/sysmon_envsysvar.h
--- a/sys/dev/sysmon/sysmon_envsysvar.h Wed Oct 17 22:41:41 2012 +0000
+++ b/sys/dev/sysmon/sysmon_envsysvar.h Fri Oct 19 17:28:01 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsysvar.h,v 1.40.8.2 2012/10/17 21:21:43 riz Exp $ */
+/* $NetBSD: sysmon_envsysvar.h,v 1.40.8.3 2012/10/19 17:28:02 riz Exp $ */
/*-
* Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -128,7 +128,7 @@
struct sysmon_envsys *, sysmon_envsys_lim_t *,
uint32_t, int, int);
int sme_event_unregister(struct sysmon_envsys *, const char *, int);
-int sme_event_unregister_sensor(struct sysmon_envsys *, envsys_data_t *);
+int sme_event_unregister_sensor(struct sysmon_envsys *, envsys_data_t *);
void sme_event_unregister_all(struct sysmon_envsys *);
void sme_event_drvadd(void *);
int sme_events_init(struct sysmon_envsys *);
Home |
Main Index |
Thread Index |
Old Index