merge changes from mpd-tree:

-use tree for tagTracker
-eliminate the master process

git-svn-id: https://svn.musicpd.org/mpd/trunk@4571 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes
2006-08-06 06:40:11 +00:00
parent a8393d3937
commit 31de97a42b
12 changed files with 915 additions and 294 deletions

View File

@@ -95,15 +95,18 @@ void initPlayerData(void)
/* for audioDeviceStates[] */
allocationSize += device_array_size;
if ((shmid = shmget(IPC_PRIVATE, allocationSize, IPC_CREAT | 0600)) < 0) {
if ((shmid = shmget(IPC_PRIVATE, allocationSize, IPC_CREAT | 0600)) < 0)
{
ERROR("problems shmget'ing\n");
exit(EXIT_FAILURE);
}
if (!(playerData_pd = shmat(shmid, NULL, 0))) {
if (!(playerData_pd = shmat(shmid, NULL, 0)))
{
ERROR("problems shmat'ing\n");
exit(EXIT_FAILURE);
}
if (shmctl(shmid, IPC_RMID, NULL) < 0) {
if (shmctl(shmid, IPC_RMID, NULL) < 0)
{
ERROR("problems shmctl'ing\n");
exit(EXIT_FAILURE);
}
@@ -159,16 +162,6 @@ PlayerData *getPlayerData(void)
return playerData_pd;
}
int getPlayerPid(void)
{
return playerData_pd->pid;
}
void setPlayerPid(int pid)
{
playerData_pd->pid = pid;
}
void freePlayerData(void)
{
shmdt(playerData_pd);