fifo.c

来自「linux下的fusion程序,可以和directfb配合使用」· C语言 代码 · 共 54 行

C
54
字号
/* *	Fusion Kernel Module * *	(c) Copyright 2002-2003  Convergence GmbH * *      Written by Denis Oliver Kropp <dok@directfb.org> * * *	This program is free software; you can redistribute it and/or *	modify it under the terms of the GNU General Public License *	as published by the Free Software Foundation; either version *	2 of the License, or (at your option) any later version. */#include <linux/types.h>#include "fifo.h"voidfusion_fifo_put (FusionFifo *fifo, FusionLink *link){     link->prev = fifo->last;     link->next = NULL;     if (fifo->last)          fifo->last->next = link;     else          fifo->first = link;     fifo->last = link;     fifo->count++;}FusionLink *fusion_fifo_get (FusionFifo *fifo){     FusionLink *first = fifo->first;     if (!first)          return NULL;     fifo->first = first->next;     if (fifo->last == first)          fifo->last = NULL;     else          fifo->first->prev = NULL;     fifo->count--;     return first;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?