* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: blaze-data.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
* The above named program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* ========== Copyright Header End ============================================
#pragma ident "@(#)1.1 09/19/03 blaze-data.h"
template <class T
> class List1Node
///////////////////////////////////////
static List1Node
* CreateInstance (const char *from
)
List1Node
* p
= (List1Node
*) calloc (1, sizeof(List1Node
));
fprintf (stderr
, "<%s>: unable to allocate %d bytes \n",
from
, sizeof(List1Node
));
fprintf (stderr
, "<LIST1>: unable to allocate %d bytes \n",
///////////////////////////////////////
static void AddTailProtected (List1Node
**head
, List1Node
**tail
, List1Node
*instance
, mutex_t
*lock
)
*head
= *tail
= instance
;
///////////////////////////////////////
static void AddTail (List1Node
**head
, List1Node
**tail
, List1Node
*instance
)
*head
= *tail
= instance
;
static void AddTail (List1Node
**head
, List1Node
*instance
)
List1Node
* tail
= *head
;
///////////////////////////////////////
static void AddHeadProtected (List1Node
**head
, List1Node
*instance
, mutex_t
*lock
)
///////////////////////////////////////
static void AddHead (List1Node
**head
, List1Node
*instance
)
///////////////////////////////////////
static void DeleteHead (List1Node
**head
)
///////////////////////////////////////
static List1Node
* GetHeadProtected (List1Node
**head
, mutex_t
*lock
)
///////////////////////////////////////
static List1Node
* GetHead (List1Node
**head
)
///////////////////////////////////////
static void DeleteNode (List1Node
**head
, List1Node
*prv
)
List1Node
*pinstance
= (*head
);
(*head
) = pinstance
->next
;
List1Node
*pinstance
= prv
->next
;
prv
->next
= pinstance
->next
;
///////////////////////////////////////
///////////////////////////////////////
///////////////////////////////////////
///////////////////////////////////////
static void LinktoTail (List1Node
*tail
, List1Node
*head
)