projects
/
psensor-pkg-ubuntu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 1.1.1
[psensor-pkg-ubuntu.git]
/
src
/
lib
/
slog.c
diff --git
a/src/lib/slog.c
b/src/lib/slog.c
index
99eb536
..
15ccd0b
100644
(file)
--- a/
src/lib/slog.c
+++ b/
src/lib/slog.c
@@
-34,6
+34,7
@@
#include "bool.h"
#include "config.h"
#include <plog.h>
#include "bool.h"
#include "config.h"
#include <plog.h>
+#include <pmutex.h>
#include "ptime.h"
#include "slog.h"
#include "ptime.h"
#include "slog.h"
@@
-133,7
+134,7
@@
static void slog_write_sensors(struct psensor **sensors)
bool first_call;
if (!file) {
bool first_call;
if (!file) {
- log_
err
(_("Sensor log file not open."));
+ log_
debug
(_("Sensor log file not open."));
return ;
}
return ;
}
@@
-169,9
+170,9
@@
static void *slog_routine(void *data)
{
while (1) {
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
{
while (1) {
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
- p
thread_
mutex_lock(sensors_mutex);
+ pmutex_lock(sensors_mutex);
slog_write_sensors(sensors);
slog_write_sensors(sensors);
- p
thread_
mutex_unlock(sensors_mutex);
+ pmutex_unlock(sensors_mutex);
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
sleep(period);
}
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
sleep(period);
}