1
/* $Id: hspstream_queue.h,v 1.5 2005/02/09 20:55:38 dondosha Exp $
2
* ===========================================================================
5
* National Center for Biotechnology Information
7
* This software/database is a "United States Government Work" under the
8
* terms of the United States Copyright Act. It was written as part of
9
* the author's official duties as a United States Government employee and
10
* thus cannot be copyrighted. This software/database is freely available
11
* to the public for use. The National Library of Medicine and the U.S.
12
* Government have not placed any restriction on its use or reproduction.
14
* Although all reasonable efforts have been taken to ensure the accuracy
15
* and reliability of the software and data, the NLM and the U.S.
16
* Government do not and cannot warrant the performance or results that
17
* may be obtained by using this software or data. The NLM and the U.S.
18
* Government disclaim all warranties, express or implied, including
19
* warranties of performance, merchantability or fitness for any particular
22
* Please cite the author in any work or product based on this material.
24
* ===========================================================================
26
* Author: Ilya Dondoshansky
30
/** @file hspstream_queue.h
31
* Implementation of the BlastHSPStream interface for producing results on the
35
#ifndef HSPSTREAM_QUEUE_H
36
#define HSPSTREAM_QUEUE_H
43
#include <algo/blast/core/blast_options.h>
44
#include <algo/blast/core/blast_hits.h>
45
#include <algo/blast/core/blast_seqsrc.h>
46
#include <algo/blast/core/blast_hspstream.h>
48
/** @addtogroup CToolkitAlgoBlast
53
/** Data structure for the queue implementation of BlastHSPStream */
54
typedef struct BlastHSPListQueueData {
55
ListNode* m_queueStart; /**< First element of the linked list of HSP
57
ListNode* m_queueEnd; /**< Last element in the linked list of HSP
59
Boolean m_writingDone; /**< Has writing to this stream been finished? */
60
TNlmMutex m_resultsMutex;/**< Mutex for writing to this queue. */
61
TNlmSemaphore m_resultsSema; /**< Semaphore for reading from this queue. */
62
} BlastHSPListQueueData;
64
/** Function to initialize the queue implementation of BlastHSPStream */
65
BlastHSPStream* Blast_HSPListQueueInit(void);
73
#endif /* HSPSTREAM_QUEUE_H */