Copyright (C) 2009-2010 Andrejs Sisojevs <andrejs.sisojevs@nextmail.ru>

All rights reserved.

For license and copyright information, see the file COPYRIGHT


module Control.Concurrent.PriorityChansConverger.Commons where

import Control.Concurrent.STM.TChan.ExtsCommons

type StartPriority         = ChanContentAmountMeasure
type CurrentPriority       = StartPriority
type PCC_ContainsGivenSpecification = Bool
type NothingElseIsInStruct = Bool
type InterruptShouldWe     = Bool

data FailureReasonWPCC = BadKey_FRWPCC | ChanFull_FRWPCC
instance Show FailureReasonWPCC where
        show fr = case fr of
                      BadKey_FRWPCC   -> "Error in adressing priority channel in converger: bad key."
                      ChanFull_FRWPCC -> "There's no free space in priority channel - it's full."