From 96a683fa5eb99ca5399a38c683d3307362104663 Mon Sep 17 00:00:00 2001 From: Pete Marshall Date: Thu, 17 Sep 2020 09:35:11 +0100 Subject: [PATCH] Changed passing fd by value when creating flipQueue thread --- driver/modeset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/modeset.c b/driver/modeset.c index c2c159f..bbccb20 100644 --- a/driver/modeset.c +++ b/driver/modeset.c @@ -29,7 +29,7 @@ static void* flipQueueThreadFunction(void* vargp) { uint32_t run = 1; uint64_t lastFinishedSeqno = 0; - int threadFD = *(int*)vargp; + int threadFD = (int)vargp; while(run) { @@ -246,7 +246,7 @@ void modeset_create_surface_for_mode(int fd, uint32_t display, uint32_t mode, mo if(!refCount) { flipQueueFifo = createFifo(dataMem, fifoMem, FLIP_FIFO_SIZE, sizeof(vsyncData)); - pthread_create(&flipQueueThread, 0, flipQueueThreadFunction, &fd); + pthread_create(&flipQueueThread, 0, flipQueueThreadFunction, fd); sem_init(&flipQueueSem, 0, 0); sem_post(&flipQueueSem);