MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / include / asm-ia64 / sn / labelcl.h
blobb5b9503f19083631e61c811f0130d6a43cd57144
1 /*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
6 * Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
7 */
8 #ifndef _ASM_IA64_SN_LABELCL_H
9 #define _ASM_IA64_SN_LABELCL_H
11 #define LABELCL_MAGIC 0x4857434c /* 'HWLC' */
12 #define LABEL_LENGTH_MAX 256 /* Includes NULL char */
13 #define INFO_DESC_PRIVATE (-1) /* default */
14 #define INFO_DESC_EXPORT 0 /* export info itself */
17 * Description of a label entry.
19 typedef struct label_info_s {
20 char *name;
21 arb_info_desc_t desc;
22 arbitrary_info_t info;
23 } label_info_t;
26 * Definition of the data structure that provides the link to
27 * the hwgraph fastinfo and the label entries associated with a
28 * particular hwgraph entry.
30 typedef struct labelcl_info_s {
31 unsigned long hwcl_magic;
32 unsigned long num_labels;
33 void *label_list;
34 arbitrary_info_t IDX_list[HWGRAPH_NUM_INDEX_INFO];
35 } labelcl_info_t;
38 * Definitions for the string table that holds the actual names
39 * of the labels.
41 struct string_table_item {
42 struct string_table_item *next;
43 char string[1];
46 struct string_table {
47 struct string_table_item *string_table_head;
48 long string_table_generation;
52 #define STRTBL_BASIC_SIZE ((size_t)(((struct string_table_item *)0)->string))
53 #define STRTBL_ITEM_SIZE(str_length) (STRTBL_BASIC_SIZE + (str_length) + 1)
55 #define STRTBL_ALLOC(str_length) \
56 ((struct string_table_item *)kmalloc(STRTBL_ITEM_SIZE(str_length), GFP_KERNEL))
58 #define STRTBL_FREE(ptr) kfree(ptr)
61 extern labelcl_info_t *labelcl_info_create(void);
62 extern int labelcl_info_destroy(labelcl_info_t *);
63 extern int labelcl_info_add_LBL(vertex_hdl_t, char *, arb_info_desc_t, arbitrary_info_t);
64 extern int labelcl_info_remove_LBL(vertex_hdl_t, char *, arb_info_desc_t *, arbitrary_info_t *);
65 extern int labelcl_info_replace_LBL(vertex_hdl_t, char *, arb_info_desc_t,
66 arbitrary_info_t, arb_info_desc_t *, arbitrary_info_t *);
67 extern int labelcl_info_get_LBL(vertex_hdl_t, char *, arb_info_desc_t *,
68 arbitrary_info_t *);
69 extern int labelcl_info_get_next_LBL(vertex_hdl_t, char *, arb_info_desc_t *,
70 arbitrary_info_t *, labelcl_info_place_t *);
71 extern int labelcl_info_replace_IDX(vertex_hdl_t, int, arbitrary_info_t,
72 arbitrary_info_t *);
73 extern int labelcl_info_connectpt_set(vertex_hdl_t, vertex_hdl_t);
74 extern int labelcl_info_get_IDX(vertex_hdl_t, int, arbitrary_info_t *);
76 #endif /* _ASM_IA64_SN_LABELCL_H */