aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-04-12 18:51:16 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-04-12 18:51:16 +0000
commit6bc445d00f7479c106828651abc3d76ddee5a5a5 (patch)
tree48ee93aacef62c3abddf29ad0f860917b376ebb8
parent57742785b4ebd756ea4c7b05aeed873a103bb9e3 (diff)
downloadmpd-6bc445d00f7479c106828651abc3d76ddee5a5a5.tar.gz
mpd-6bc445d00f7479c106828651abc3d76ddee5a5a5.tar.xz
mpd-6bc445d00f7479c106828651abc3d76ddee5a5a5.zip
volatile fun-ness
git-svn-id: https://svn.musicpd.org/mpd/trunk@705 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/audio.h6
-rw-r--r--src/decode.c2
-rw-r--r--src/directory.c6
-rw-r--r--src/player.c4
-rw-r--r--src/player.h48
5 files changed, 33 insertions, 33 deletions
diff --git a/src/audio.h b/src/audio.h
index 9a4bb10cf..58a83a79a 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -28,9 +28,9 @@
#define AUDIO_AO_DRIVER_DEFAULT "default"
typedef struct _AudioFormat {
- mpd_sint8 volatile channels;
- mpd_uint32 volatile sampleRate;
- mpd_sint8 volatile bits;
+ volatile mpd_sint8 channels;
+ volatile mpd_uint32 sampleRate;
+ volatile mpd_sint8 bits;
} AudioFormat;
void initAudioDriver();
diff --git a/src/decode.c b/src/decode.c
index 4b50192b4..75872c431 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -52,7 +52,7 @@
#include <unistd.h>
#include <string.h>
-int volatile * decode_pid = NULL;
+volatile int * volatile decode_pid = NULL;
void decodeSigHandler(int sig) {
if(sig==SIGCHLD) {
diff --git a/src/directory.c b/src/directory.c
index a93c84fb2..6b1ed9441 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -72,11 +72,11 @@ Directory * mp3rootDirectory = NULL;
char directorydb[MAXPATHLEN+1];
-int directory_updatePid = 0;
+volatile int directory_updatePid = 0;
-int directory_reReadDB = 0;
+volatile int directory_reReadDB = 0;
-mpd_uint16 directory_updateJobId = 0;
+volatile mpd_uint16 directory_updateJobId = 0;
DirectoryList * newDirectoryList();
diff --git a/src/player.c b/src/player.c
index ecf7036f3..417b76f69 100644
--- a/src/player.c
+++ b/src/player.c
@@ -45,8 +45,8 @@
#include <errno.h>
#include <fcntl.h>
-int player_pid = 0;
-int player_termSent = 0;
+volatile int player_pid = 0;
+volatile int player_termSent = 0;
void resetPlayer() {
int pid;
diff --git a/src/player.h b/src/player.h
index 6e60dc274..7bfd1e559 100644
--- a/src/player.h
+++ b/src/player.h
@@ -51,32 +51,32 @@
#define PLAYER_QUEUE_LOCKED 1
typedef struct _PlayerControl {
- mpd_sint8 volatile decodeType;
- mpd_sint8 volatile stop;
- mpd_sint8 volatile play;
- mpd_sint8 volatile pause;
- mpd_sint8 volatile state;
- mpd_sint8 volatile closeAudio;
- mpd_sint8 volatile error;
- mpd_uint16 bitRate;
- mpd_sint8 bits;
- mpd_sint8 channels;
- mpd_uint32 sampleRate;
- float beginTime;
- float totalTime;
- float elapsedTime;
+ volatile mpd_sint8 decodeType;
+ volatile mpd_sint8 stop;
+ volatile mpd_sint8 play;
+ volatile mpd_sint8 pause;
+ volatile mpd_sint8 state;
+ volatile mpd_sint8 closeAudio;
+ volatile mpd_sint8 error;
+ volatile mpd_uint16 bitRate;
+ volatile mpd_sint8 bits;
+ volatile mpd_sint8 channels;
+ volatile mpd_uint32 sampleRate;
+ volatile float beginTime;
+ volatile float totalTime;
+ volatile float elapsedTime;
char file[MAXPATHLEN+1];
char erroredFile[MAXPATHLEN+1];
- mpd_sint8 volatile queueState;
- mpd_sint8 volatile queueLockState;
- mpd_sint8 volatile lockQueue;
- mpd_sint8 volatile unlockQueue;
- mpd_sint8 volatile seek;
- double volatile seekWhere;
- float crossFade;
- mpd_uint16 softwareVolume;
- double totalPlayTime;
- int volatile decode_pid;
+ volatile mpd_sint8 queueState;
+ volatile mpd_sint8 queueLockState;
+ volatile mpd_sint8 lockQueue;
+ volatile mpd_sint8 unlockQueue;
+ volatile mpd_sint8 seek;
+ volatile double seekWhere;
+ volatile float crossFade;
+ volatile mpd_uint16 softwareVolume;
+ volatile double totalPlayTime;
+ volatile int decode_pid;
} PlayerControl;
void player_sigChldHandler(int pid, int status);