1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed a memory leak in thread handling when using NPTL

This commit is contained in:
Klaus Schmidinger 2004-03-14 16:51:13 +01:00
parent faea9fed91
commit 25154b6245
4 changed files with 10 additions and 4 deletions

View File

@ -797,6 +797,7 @@ Karim Afifi <karim.afifi@free.fr>
Jon Burgess <mplayer@jburgess.uklinux.net> Jon Burgess <mplayer@jburgess.uklinux.net>
for pointing out a problem with NPTL ("Native Posix Thread Library") for pointing out a problem with NPTL ("Native Posix Thread Library")
for changing thread handling to make it work with NPTL ("Native Posix Thread Library") for changing thread handling to make it work with NPTL ("Native Posix Thread Library")
for fixing a memory leak in thread handling when using NPTL
Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de> Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
for reporting a crash when cancelling a newly created timer for reporting a crash when cancelling a newly created timer

View File

@ -2745,3 +2745,7 @@ Video Disk Recorder Revision History
events to timers. events to timers.
- Now explicitly turning on the LNB power at startup, because newer drivers don't - Now explicitly turning on the LNB power at startup, because newer drivers don't
do this any more (thanks to Oliver Endriss for pointing this out). do this any more (thanks to Oliver Endriss for pointing this out).
2004-03-14: Version 1.3.7
- Fixed a memory leak in thread handling when using NPTL (thanks to Jon Burgess).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: config.h 1.190 2004/03/05 14:35:15 kls Exp $ * $Id: config.h 1.191 2004/03/14 16:51:13 kls Exp $
*/ */
#ifndef __CONFIG_H #ifndef __CONFIG_H
@ -20,8 +20,8 @@
#include "i18n.h" #include "i18n.h"
#include "tools.h" #include "tools.h"
#define VDRVERSION "1.3.6" #define VDRVERSION "1.3.7"
#define VDRVERSNUM 10306 // Version * 10000 + Major * 100 + Minor #define VDRVERSNUM 10307 // Version * 10000 + Major * 100 + Minor
#define MAXPRIORITY 99 #define MAXPRIORITY 99
#define MAXLIFETIME 99 #define MAXLIFETIME 99

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: thread.c 1.30 2004/01/03 16:59:33 kls Exp $ * $Id: thread.c 1.31 2004/03/14 16:48:30 kls Exp $
*/ */
#include "thread.h" #include "thread.h"
@ -199,6 +199,7 @@ bool cThread::Start(void)
running = true; running = true;
parentTid = pthread_self(); parentTid = pthread_self();
pthread_create(&childTid, NULL, (void *(*) (void *))&StartThread, (void *)this); pthread_create(&childTid, NULL, (void *(*) (void *))&StartThread, (void *)this);
pthread_detach(childTid); // auto-reap
pthread_setschedparam(childTid, SCHED_RR, 0); pthread_setschedparam(childTid, SCHED_RR, 0);
usleep(10000); // otherwise calling Active() immediately after Start() causes a "pure virtual method called" error usleep(10000); // otherwise calling Active() immediately after Start() causes a "pure virtual method called" error
} }