⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 paje.h

📁 linux下的多线程调试工具
💻 H
字号:
/* Copyright (C) 2004,2005,2006  Bull S.A. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#include "paje_def.h"/* create a program */#define create_prog() {\    ret = fprintf (fd, " 7 00000000000000.000000 program program 0 " \                       "\"PROGRAM\"\n");\    if (ret < 0) return ret;\}/* destroy a program */#define destroy_prog() {\    ret = fprintf (fd, " 8 %021.6Lf program program\n", float_time);\    if (ret < 0) return ret;\}/* create a NPTL object */#define create_object(object_name, object_type) {\    ret = fprintf (fd, " 7 %021.6Lf %s " object_type " program \"%s\"\n", \                   float_time, object_name, object_name);\    if (ret < 0) return ret;\}/* create a NPTL object statically */#define create_object_static(object_name, object_type) {\    ret = fprintf (fd, " 7 00000000000000.000000 %s " object_type \                   " program \"%s\"\n", object_name, object_name);\    if (ret < 0) return ret;\}/* destroy a NPTL object */#define destroy_object(object_name, object_type) {\    ret = fprintf (fd, " 8 %021.6Lf " object_type " %s\n", float_time, \                   object_name);\    if (ret < 0) return ret;\}/* display an event */#define new_event(object_name, event_name) {\    ret = fprintf (fd, " 9 %021.6Lf " event_name " %s failed\n", float_time, \                  object_name);\    if (ret < 0) return ret;\}/* set the state of a NPTL object */#define set_object_state(object_name, state_name, value) {\    ret = fprintf (fd, "10 %021.6Lf " state_name " %s %s\n", float_time, \                   object_name, value);\    if (ret < 0) return ret;\}/* set the state of a NPTL object statically */#define set_object_state_static(object_name, state_name, value) {\    ret = fprintf (fd, "10 00000000000000.000000 " state_name " %s %s\n", \                   object_name, value);\    if (ret < 0) return ret;\}/* push the state of a NPTL object */#define push_object_state(object_name, state_name, value) {\	ret = fprintf (fd, "11 %021.6Lf " state_name " %s %s\n", float_time, \                       object_name, value);\    if (ret < 0) return ret;\}/* pop the state of a NPTL object */#define pop_object_state(object_name, state_name) {\    ret = fprintf (fd, "12 %021.6Lf " state_name " %s\n", float_time, \                   object_name);\    if (ret < 0) return ret;\}/* set the variable of a NPTL object */#define set_object_variable(object_name, variable_name, value) {\    ret = fprintf (fd, "13 %021.6Lf " variable_name " %s %u\n", float_time, \                   object_name, value);\    if (ret < 0) return ret;\}/* set the variable of a NPTL object statically */#define set_object_variable_static(object_name, variable_name, value) {\    ret = fprintf (fd, "13 00000000000000.000000 " variable_name " %s %u\n", \                   object_name, value);\    if (ret < 0) return ret;\}/* increment the variable of a NPTL object */#define inc_object_variable(object_name, variable_name) {\    ret = fprintf (fd, "14 %021.6Lf " variable_name " %s %u\n", float_time, \                   object_name, 1);\    if (ret < 0) return ret;\}/* decrement the variable of a NPTL object */#define dec_object_variable(object_name, variable_name) {\    ret = fprintf (fd, "15 %021.6Lf " variable_name " %s %u\n", float_time, \                   object_name, 1);\    if (ret < 0) return ret;\}/* link two NPTL objects * src: name of the source * dest: name of the destination * link_name: name of the link * link_col: color of the link */#define link_objects(src, dest, link_name, link_col) {\    ret = fprintf (fd, "16 %021.6Lf " link_name " program %s " link_col \                   " key\n", float_time, src);\    if (ret < 0) return ret;\    ret = fprintf (fd, "17 %021.6Lf " link_name " program %s " link_col \                   " key\n", float_time, dest);\    if (ret < 0) return ret;\}

⌨️ 快捷键说明

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