Compare commits
No commits in common. "cb3bcb8c253ccf7ac437eec4143a64fec7e86c14" and "95225420b1f4e37f40e8b74f23fedbace78bbf0d" have entirely different histories.
cb3bcb8c25
...
95225420b1
|
@ -1,53 +0,0 @@
|
|||
% Joint probability distribution
|
||||
P_XY = [0.3, 0.2, 0;
|
||||
0.1, 0.15, 0.05;
|
||||
0, 0.1, 0.1];
|
||||
|
||||
% Values of X and Y
|
||||
X_vals = [0, 1, 2];
|
||||
Y_vals = [0, 1, 2];
|
||||
|
||||
% Marginal distributions
|
||||
P_X = sum(P_XY, 2);
|
||||
P_Y = sum(P_XY, 1);
|
||||
|
||||
% Mean of X and Y
|
||||
E_X = sum(X_vals .* P_X');
|
||||
E_Y = sum(Y_vals .* P_Y);
|
||||
|
||||
% Variance of X and Y
|
||||
Var_X = sum((X_vals - E_X).^2 .* P_X');
|
||||
Var_Y = sum((Y_vals - E_Y).^2 .* P_Y);
|
||||
|
||||
% Covariance of X and Y
|
||||
E_XY = sum(sum((X_vals' * Y_vals) .* P_XY));
|
||||
Cov_XY = E_XY - E_X * E_Y;
|
||||
|
||||
% Correlation coefficient
|
||||
rho_XY = Cov_XY / sqrt(Var_X * Var_Y);
|
||||
|
||||
% Display results
|
||||
fprintf('Marginal PMF of X: \n');
|
||||
disp(P_X');
|
||||
fprintf('Marginal PMF of Y: \n');
|
||||
disp(P_Y);
|
||||
fprintf('Mean of X: %.2f\n', E_X);
|
||||
fprintf('Mean of Y: %.2f\n', E_Y);
|
||||
fprintf('Variance of X: %.2f\n', Var_X);
|
||||
fprintf('Variance of Y: %.2f\n', Var_Y);
|
||||
fprintf('Covariance of X and Y: %.2f\n', Cov_XY);
|
||||
fprintf('Correlation coefficient between X and Y: %.2f\n', rho_XY);
|
||||
|
||||
% Plot Marginal PMFs
|
||||
figure;
|
||||
subplot(1,2,1);
|
||||
stem(X_vals, P_X, 'filled');
|
||||
title('Marginal PMF of X');
|
||||
xlabel('X');
|
||||
ylabel('P(X)');
|
||||
|
||||
subplot(1,2,2);
|
||||
stem(Y_vals, P_Y, 'filled');
|
||||
title('Marginal PMF of Y');
|
||||
xlabel('Y');
|
||||
ylabel('P(Y)');
|
|
@ -1,42 +0,0 @@
|
|||
% Joint probability distribution
|
||||
P_XY = [1/8, 1/8, 1/24;
|
||||
1/8, 1/4, 1/8;
|
||||
1/24, 1/8, 1/24];
|
||||
|
||||
% Values of X and Y
|
||||
X_vals = [-1, 0, 1];
|
||||
Y_vals = [-1, 0, 1];
|
||||
|
||||
% Marginal distributions
|
||||
P_X = sum(P_XY, 2); % Sum across rows for X
|
||||
P_Y = sum(P_XY, 1); % Sum across columns for Y
|
||||
|
||||
% Checking independence
|
||||
independence = true; % Assume independence initially
|
||||
|
||||
for i = 1:length(X_vals)
|
||||
for j = 1:length(Y_vals)
|
||||
% Calculate product of marginals
|
||||
product_marginals = P_X(i) * P_Y(j);
|
||||
|
||||
% Compare with joint probability
|
||||
if abs(P_XY(i, j) - product_marginals) > 1e-10
|
||||
independence = false;
|
||||
break;
|
||||
end
|
||||
end
|
||||
if ~independence
|
||||
break;
|
||||
end
|
||||
end
|
||||
|
||||
% Display results
|
||||
fprintf('Marginal PMF of X: \n');
|
||||
disp(P_X');
|
||||
fprintf('Marginal PMF of Y: \n');
|
||||
disp(P_Y);
|
||||
if independence
|
||||
fprintf('X and Y are independent.\n');
|
||||
else
|
||||
fprintf('X and Y are not independent.\n');
|
||||
end
|
|
@ -1,72 +0,0 @@
|
|||
%% a)
|
||||
% Number of students
|
||||
num_students = 120;
|
||||
|
||||
% Mean and variance for N1 and N2
|
||||
mu_N1 = 14;
|
||||
var_N1 = 3.5;
|
||||
mu_N2 = 16.8;
|
||||
var_N2 = 4.2;
|
||||
|
||||
% Standard deviations
|
||||
sigma_N1 = sqrt(var_N1);
|
||||
sigma_N2 = sqrt(var_N2);
|
||||
|
||||
% Generate N1 and N2 from a normal distribution
|
||||
N1 = round(normrnd(mu_N1, sigma_N1, [num_students, 1]));
|
||||
N2 = round(normrnd(mu_N2, sigma_N2, [num_students, 1]));
|
||||
|
||||
% Ensure values are within a reasonable range (e.g., scores between 0 and 20)
|
||||
N1 = max(0, min(20, N1));
|
||||
N2 = max(0, min(20, N2));
|
||||
|
||||
%% b)
|
||||
% Joint PMF calculation
|
||||
joint_counts = zeros(21, 21);
|
||||
for i = 1:num_students
|
||||
joint_counts(N1(i)+1, N2(i)+1) = joint_counts(N1(i)+1, N2(i)+1) + 1;
|
||||
end
|
||||
joint_pmf = joint_counts / num_students;
|
||||
|
||||
% Plotting the joint PMF
|
||||
[X, Y] = meshgrid(0:20, 0:20);
|
||||
figure;
|
||||
bar3(joint_pmf);
|
||||
xlabel('N_1 scores');
|
||||
ylabel('N_2 scores');
|
||||
zlabel('Joint Probability');
|
||||
title('Joint PMF of N_1 and N_2');
|
||||
|
||||
%% c)
|
||||
% Calculate correlation coefficient
|
||||
correlation_matrix = corrcoef(N1, N2);
|
||||
correlation_coefficient = correlation_matrix(1, 2);
|
||||
|
||||
% Display result
|
||||
fprintf('Correlation coefficient between N1 and N2: %.2f\n', correlation_coefficient);
|
||||
|
||||
%% d)
|
||||
% Marginal PMFs
|
||||
marginal_N1 = sum(joint_pmf, 2);
|
||||
marginal_N2 = sum(joint_pmf, 1);
|
||||
|
||||
% Check independence by verifying if joint PMF = product of marginals
|
||||
independent = true;
|
||||
for i = 1:21
|
||||
for j = 1:21
|
||||
if abs(joint_pmf(i, j) - (marginal_N1(i) * marginal_N2(j))) > 1e-10
|
||||
independent = false;
|
||||
break;
|
||||
end
|
||||
end
|
||||
if ~independent
|
||||
break;
|
||||
end
|
||||
end
|
||||
|
||||
% Display independence result
|
||||
if independent
|
||||
fprintf('N1 and N2 are independent.\n');
|
||||
else
|
||||
fprintf('N1 and N2 are not independent.\n');
|
||||
end
|
|
@ -1,22 +0,0 @@
|
|||
% Given probabilities
|
||||
P_S = 0.75; % Probability of a sunny day
|
||||
P_R = 0.25; % Probability of a rainy day
|
||||
P_C_given_S = 1/3; % Probability meteorologist is correct given sunny day
|
||||
P_C_given_R = 1; % Probability meteorologist is correct given rainy day
|
||||
|
||||
% Part 1: Calculate overall accuracy of the meteorologist
|
||||
P_C = P_C_given_S * P_S + P_C_given_R * P_R;
|
||||
|
||||
% Part 2: Calculate accuracy if the student always predicts sun
|
||||
P_student_correct = P_S;
|
||||
|
||||
% Display the results
|
||||
fprintf('Meteorologist''s overall accuracy: %.2f%%\n', P_C * 100);
|
||||
fprintf('Student''s accuracy if they always predict sun: %.2f%%\n', P_student_correct * 100);
|
||||
|
||||
% Decision analysis
|
||||
if P_C > P_student_correct
|
||||
fprintf('The meteorologist''s balanced prediction method is better.\n');
|
||||
else
|
||||
fprintf('The student''s method of always predicting sun is better.\n');
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
CXX = g++
|
||||
CPPFLAGS=-Wall -Wfatal-errors -Wno-write-strings -Wno-unused-function -ggdb -pthread -Iinclude # -DEXCEPTION_POLICY or -DEXIT_POLICY
|
||||
LDFLAGS = -Llib -lsoconcur
|
||||
|
||||
OBJS=pfifo.o urgency.o
|
||||
|
||||
TARGET = urgency
|
||||
|
||||
.PHONY: all clean cleanall
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
urgency: $(OBJS)
|
||||
$(CXX) $(CPPFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -fv *.o core
|
||||
|
||||
cleanall: clean
|
||||
rm -f $(TARGET)
|
||||
|
Before Width: | Height: | Size: 676 B |
Before Width: | Height: | Size: 147 B |
Before Width: | Height: | Size: 132 B |
|
@ -1,108 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: dbc.h File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('dbc_8h.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">dbc.h File Reference<div class="ingroups"><a class="el" href="group___db_c.html">DbC</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Design-by-Contract module.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <stdio.h></code><br />
|
||||
<code>#include <stdlib.h></code><br />
|
||||
<code>#include <assert.h></code><br />
|
||||
<code>#include "<a class="el" href="utils_8h_source.html">utils.h</a>"</code><br />
|
||||
</div>
|
||||
<p><a href="dbc_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:gac101c8ba449f6f8c71b3789a9c489221"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221">check</a>(condition, message)</td></tr>
|
||||
<tr class="memdesc:gac101c8ba449f6f8c71b3789a9c489221"><td class="mdescLeft"> </td><td class="mdescRight">Checks the verification of an general algorithm assertion. <a href="group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac101c8ba449f6f8c71b3789a9c489221"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5bf1825f80465097d4b753a001cf1af8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8">require</a>(condition, message)</td></tr>
|
||||
<tr class="memdesc:ga5bf1825f80465097d4b753a001cf1af8"><td class="mdescLeft"> </td><td class="mdescRight">Checks the verification of a precondition. <a href="group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga5bf1825f80465097d4b753a001cf1af8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5d17c602c4f191371a5fec5af7adc3cf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf">ensure</a>(condition, message)</td></tr>
|
||||
<tr class="memdesc:ga5d17c602c4f191371a5fec5af7adc3cf"><td class="mdescLeft"> </td><td class="mdescRight">Checks the verification of a postcondition. <a href="group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga5d17c602c4f191371a5fec5af7adc3cf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf9d59b04beef1bf139e10fc44c6f9725"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725">invariant</a>(condition, message)</td></tr>
|
||||
<tr class="memdesc:gaf9d59b04beef1bf139e10fc44c6f9725"><td class="mdescLeft"> </td><td class="mdescRight">Checks the verification of an invariant. <a href="group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaf9d59b04beef1bf139e10fc44c6f9725"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Design-by-Contract module. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dbc_8h.html">dbc.h</a></li>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||
var dbc_8h =
|
||||
[
|
||||
[ "check", "group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221", null ],
|
||||
[ "require", "group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8", null ],
|
||||
[ "ensure", "group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf", null ],
|
||||
[ "invariant", "group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725", null ]
|
||||
];
|
|
@ -1,203 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: dbc.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('dbc_8h_source.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">dbc.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="dbc_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#ifndef DBC_H</span></div>
|
||||
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#define DBC_H</span></div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  </div>
|
||||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include <stdio.h></span></div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include <stdlib.h></span></div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#include <assert.h></span></div>
|
||||
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#include "<a class="code" href="utils_8h.html">utils.h</a>"</span></div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  </div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="preprocessor">#ifdef NDEBUG</span></div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor">#define NDEBUG_CHECKS</span></div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor">#define NDEBUG_PRECONDITIONS</span></div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor">#define NDEBUG_POSTCONDITIONS</span></div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor">#define NDEBUG_INVARIANTS</span></div>
|
||||
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  </div>
|
||||
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor">#ifdef DEBUG_ONLY_PRECONDITIONS</span></div>
|
||||
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor">#ifdef NDEBUG_PRECONDITIONS</span></div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="preprocessor">#undef NDEBUG_PRECONDITIONS</span></div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor">#ifndef NDEBUG_CHECKS</span></div>
|
||||
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor">#define NDEBUG_CHECKS</span></div>
|
||||
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="preprocessor">#ifndef NDEBUG_POSTCONDITIONS</span></div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="preprocessor">#define NDEBUG_POSTCONDITIONS</span></div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="preprocessor">#ifndef NDEBUG_INVARIANTS</span></div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="preprocessor">#define NDEBUG_INVARIANTS</span></div>
|
||||
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  </div>
|
||||
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// check:</span></div>
|
||||
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="preprocessor">#ifdef NDEBUG_CHECKS</span></div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="preprocessor">#define check(condition, message)</span></div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="preprocessor">#else</span></div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="preprocessor">#if defined __cplusplus && defined EXCEPTION_POLICY</span></div>
|
||||
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="preprocessor">#define check(condition, message) \</span></div>
|
||||
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="preprocessor"> if (!(condition)) \</span></div>
|
||||
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="preprocessor"> throw string_concat(NULL, 0, (char*)"Assertion fail", message[0] ? (char*)": " : (char*)"", message, (char*)", assertion: \"", #condition, (char*)"\", function: \"", __FUNCTION__, (char*)"\":", int2str(__LINE__), (char*)", file: \"", __FILE__, (char*)"\"\n", NULL)</span></div>
|
||||
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="preprocessor">#else // EXIT_POLICY (default)</span></div>
|
||||
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  </div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221"> 81</a></span> <span class="preprocessor">#define check(condition, message) \</span></div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="preprocessor"> if (!(condition)) \</span></div>
|
||||
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="preprocessor"> do { \</span></div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="preprocessor"> fprintf (stderr, "Assertion fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n", \</span></div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="preprocessor"> message[0] ? ": " : "", message, #condition, __FUNCTION__, __LINE__ , __FILE__); \</span></div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="preprocessor"> *((int*)0) = 0; \</span></div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="preprocessor"> abort (); \</span></div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="preprocessor"> } while (0)</span></div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  </div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  </div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment">// precondition:</span></div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="preprocessor">#ifdef NDEBUG_PRECONDITIONS</span></div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="preprocessor">#define require(condition, message)</span></div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="preprocessor">#else</span></div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="preprocessor">#if defined __cplusplus && defined EXCEPTION_POLICY</span></div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="preprocessor">#define require(condition, message) \</span></div>
|
||||
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="preprocessor"> if (!(condition)) \</span></div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="preprocessor"> throw string_concat(NULL, 0, (char*)"Precondition fail", message[0] ? (char*)": " : (char*)"", message, (char*)", assertion: \"", #condition, (char*)"\", function: \"", __FUNCTION__, (char*)"\":", int2str(__LINE__), (char*)", file: \"", __FILE__, (char*)"\"\n", NULL)</span></div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="preprocessor">#else // EXIT_POLICY (default)</span></div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  </div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8"> 110</a></span> <span class="preprocessor">#define require(condition, message) \</span></div>
|
||||
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="preprocessor"> if (!(condition)) \</span></div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="preprocessor"> do { \</span></div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="preprocessor"> fprintf (stderr, "Precondition fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n", \</span></div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="preprocessor"> message[0] ? ": " : "", message, #condition, __FUNCTION__, __LINE__ , __FILE__); \</span></div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="preprocessor"> *((int*)0) = 0; \</span></div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="preprocessor"> abort (); \</span></div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="preprocessor"> } while (0)</span></div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  </div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  </div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment">// postcondition:</span></div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="preprocessor">#ifdef NDEBUG_POSTCONDITIONS</span></div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="preprocessor">#define ensure(condition, message)</span></div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="preprocessor">#else</span></div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="preprocessor">#if defined __cplusplus && defined EXCEPTION_POLICY</span></div>
|
||||
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="preprocessor">#define ensure(condition, message) \</span></div>
|
||||
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="preprocessor"> if (!(condition)) \</span></div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="preprocessor"> throw string_concat(NULL, 0, (char*)"Postcondition fail", message[0] ? (char*)": " : (char*)"", message, (char*)", assertion: \"", #condition, (char*)"\", function: \"", __FUNCTION__, (char*)"\":", int2str(__LINE__), (char*)", file: \"", __FILE__, (char*)"\"\n", NULL)</span></div>
|
||||
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="preprocessor">#else // EXIT_POLICY (default)</span></div>
|
||||
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  </div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf"> 139</a></span> <span class="preprocessor">#define ensure(condition, message) \</span></div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="preprocessor"> if (!(condition)) \</span></div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="preprocessor"> do { \</span></div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="preprocessor"> fprintf (stderr, "Postcondition fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n", \</span></div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="preprocessor"> message[0] ? ": " : "", message, #condition, __FUNCTION__, __LINE__ , __FILE__); \</span></div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="preprocessor"> *((int*)0) = 0; \</span></div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="preprocessor"> abort (); \</span></div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="preprocessor"> } while (0)</span></div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  </div>
|
||||
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="comment">// invariant:</span></div>
|
||||
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="preprocessor">#ifdef NDEBUG_INVARIANTS</span></div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="preprocessor">#define invariant(condition, message)</span></div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="preprocessor">#else</span></div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="preprocessor">#if defined __cplusplus && defined EXCEPTION_POLICY</span></div>
|
||||
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="preprocessor">#define invariant(condition, message) \</span></div>
|
||||
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="preprocessor"> if (!(condition)) \</span></div>
|
||||
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="preprocessor"> throw string_concat(NULL, 0, (char*)"Invariant fail", message[0] ? (char*)": " : (char*)"", message, (char*)", assertion: \"", #condition, (char*)"\", function: \"", __FUNCTION__, (char*)"\":", int2str(__LINE__), (char*)", file: \"", __FILE__, (char*)"\"\n", NULL)</span></div>
|
||||
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="preprocessor">#else // EXIT_POLICY (default)</span></div>
|
||||
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  </div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725"> 168</a></span> <span class="preprocessor">#define invariant(condition, message) \</span></div>
|
||||
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span> <span class="preprocessor"> if (!(condition)) \</span></div>
|
||||
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span> <span class="preprocessor"> do { \</span></div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <span class="preprocessor"> fprintf (stderr, "Invariant fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n", \</span></div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span> <span class="preprocessor"> message[0] ? ": " : "", message, #condition, __FUNCTION__, __LINE__ , __FILE__); \</span></div>
|
||||
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="preprocessor"> *((int*)0) = 0; \</span></div>
|
||||
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="preprocessor"> abort (); \</span></div>
|
||||
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> <span class="preprocessor"> } while (0)</span></div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  </div>
|
||||
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  </div>
|
||||
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="comment">/* ************************************************** */</span></div>
|
||||
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="comment">/* ************************************************** */</span></div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  </div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="autils_8h_html"><div class="ttname"><a href="utils_8h.html">utils.h</a></div><div class="ttdoc">Useful common functions and macros.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dbc_8h.html">dbc.h</a></li>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,95 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: src Directory Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('dir_68267d1309a1af8e8297ef4c3efbcdba.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">src Directory Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
|
||||
Files</h2></td></tr>
|
||||
<tr class="memitem:dbc_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dbc_8h.html">dbc.h</a> <a href="dbc_8h_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:dbc_8h"><td class="mdescLeft"> </td><td class="mdescRight">Design-by-Contract module. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:process_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="process_8h.html">process.h</a> <a href="process_8h_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:process_8h"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="group__process.html#process">Process</a>, <a class="el" href="group__process.html#sysV">System-V</a>, and <a class="el" href="group__process.html#posix_sem">POSIX libraries</a> wrapper module. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:thread_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8h.html">thread.h</a> <a href="thread_8h_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:thread_8h"><td class="mdescLeft"> </td><td class="mdescRight">POSIX threads library wrapper module. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:utils_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8h.html">utils.h</a> <a href="utils_8h_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:utils_8h"><td class="mdescLeft"> </td><td class="mdescRight">Useful common functions and macros. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 746 B |
Before Width: | Height: | Size: 3.7 KiB |
|
@ -1,120 +0,0 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this file.
|
||||
|
||||
Copyright (C) 1997-2017 by Dimitri van Heesch
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This 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 program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this file
|
||||
*/
|
||||
function toggleVisibility(linkObj)
|
||||
{
|
||||
var base = $(linkObj).attr('id');
|
||||
var summary = $('#'+base+'-summary');
|
||||
var content = $('#'+base+'-content');
|
||||
var trigger = $('#'+base+'-trigger');
|
||||
var src=$(trigger).attr('src');
|
||||
if (content.is(':visible')===true) {
|
||||
content.hide();
|
||||
summary.show();
|
||||
$(linkObj).addClass('closed').removeClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
content.show();
|
||||
summary.hide();
|
||||
$(linkObj).removeClass('closed').addClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateStripes()
|
||||
{
|
||||
$('table.directory tr').
|
||||
removeClass('even').filter(':visible:even').addClass('even');
|
||||
}
|
||||
|
||||
function toggleLevel(level)
|
||||
{
|
||||
$('table.directory tr').each(function() {
|
||||
var l = this.id.split('_').length-1;
|
||||
var i = $('#img'+this.id.substring(3));
|
||||
var a = $('#arr'+this.id.substring(3));
|
||||
if (l<level+1) {
|
||||
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
|
||||
a.html('▼');
|
||||
$(this).show();
|
||||
} else if (l==level+1) {
|
||||
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
|
||||
a.html('►');
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
function toggleFolder(id)
|
||||
{
|
||||
// the clicked row
|
||||
var currentRow = $('#row_'+id);
|
||||
|
||||
// all rows after the clicked row
|
||||
var rows = currentRow.nextAll("tr");
|
||||
|
||||
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
|
||||
|
||||
// only match elements AFTER this one (can't hide elements before)
|
||||
var childRows = rows.filter(function() { return this.id.match(re); });
|
||||
|
||||
// first row is visible we are HIDING
|
||||
if (childRows.filter(':first').is(':visible')===true) {
|
||||
// replace down arrow by right arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
currentRowSpans.filter(".arrow").html('►');
|
||||
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
|
||||
} else { // we are SHOWING
|
||||
// replace right arrow by down arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
|
||||
currentRowSpans.filter(".arrow").html('▼');
|
||||
// replace down arrows by right arrows for child rows
|
||||
var childRowsSpans = childRows.find("span");
|
||||
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
childRowsSpans.filter(".arrow").html('►');
|
||||
childRows.show(); //show all children
|
||||
}
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
|
||||
function toggleInherit(id)
|
||||
{
|
||||
var rows = $('tr.inherit.'+id);
|
||||
var img = $('tr.inherit_header.'+id+' img');
|
||||
var src = $(img).attr('src');
|
||||
if (rows.filter(':first').is(':visible')===true) {
|
||||
rows.css('display','none');
|
||||
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
rows.css('display','table-row'); // using show() causes jump in firefox
|
||||
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
}
|
||||
/* @license-end */
|
|
@ -1,86 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: File List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('files.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">File List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="dbc_8h_source.html"><span class="icondoc"></span></a><a class="el" href="dbc_8h.html" target="_self">dbc.h</a></td><td class="desc">Design-by-Contract module </td></tr>
|
||||
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="process_8h_source.html"><span class="icondoc"></span></a><a class="el" href="process_8h.html" target="_self">process.h</a></td><td class="desc"><a class="el" href="group__process.html#process">Process</a>, <a class="el" href="group__process.html#sysV">System-V</a>, and <a class="el" href="group__process.html#posix_sem">POSIX libraries</a> wrapper module </td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="thread_8h_source.html"><span class="icondoc"></span></a><a class="el" href="thread_8h.html" target="_self">thread.h</a></td><td class="desc">POSIX threads library wrapper module </td></tr>
|
||||
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="utils_8h_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8h.html" target="_self">utils.h</a></td><td class="desc">Useful common functions and macros </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||
var files_dup =
|
||||
[
|
||||
[ "dbc.h", "dbc_8h.html", "dbc_8h" ],
|
||||
[ "process.h", "process_8h.html", "process_8h" ],
|
||||
[ "thread.h", "thread_8h.html", "thread_8h" ],
|
||||
[ "utils.h", "utils_8h.html", "utils_8h" ]
|
||||
];
|
Before Width: | Height: | Size: 616 B |
Before Width: | Height: | Size: 597 B |
|
@ -1,439 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: Globals</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('globals.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:</div>
|
||||
|
||||
<h3><a id="index_c"></a>- c -</h3><ul>
|
||||
<li>check
|
||||
: <a class="el" href="group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221">dbc.h</a>
|
||||
</li>
|
||||
<li>clear_console()
|
||||
: <a class="el" href="group__utils.html#ga3cffe15b7e5d10a108f1734a9640a2c7">utils.h</a>
|
||||
</li>
|
||||
<li>concat_2str
|
||||
: <a class="el" href="group__utils.html#ga22347cbf977a0300726f06257edd79d6">utils.h</a>
|
||||
</li>
|
||||
<li>concat_3str
|
||||
: <a class="el" href="group__utils.html#ga123e40006d54612c48c2660432dfeb23">utils.h</a>
|
||||
</li>
|
||||
<li>concat_4str
|
||||
: <a class="el" href="group__utils.html#ga69037999e65cdb42d39988e0fec48af4">utils.h</a>
|
||||
</li>
|
||||
<li>concat_5str
|
||||
: <a class="el" href="group__utils.html#ga580d1897bc7a8cef16d5a16a2373b876">utils.h</a>
|
||||
</li>
|
||||
<li>concat_6str
|
||||
: <a class="el" href="group__utils.html#ga34f8c2fcee597a99c5f4c66f2119bca9">utils.h</a>
|
||||
</li>
|
||||
<li>concat_7str
|
||||
: <a class="el" href="group__utils.html#ga01d1ea65eb6780d91705484dd46833bf">utils.h</a>
|
||||
</li>
|
||||
<li>cond_broadcast()
|
||||
: <a class="el" href="group__thread.html#ga6459039ab27da7237dda2bbc866eb2d0">thread.h</a>
|
||||
</li>
|
||||
<li>cond_destroy()
|
||||
: <a class="el" href="group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80">thread.h</a>
|
||||
</li>
|
||||
<li>cond_init()
|
||||
: <a class="el" href="group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad">thread.h</a>
|
||||
</li>
|
||||
<li>cond_signal()
|
||||
: <a class="el" href="group__thread.html#ga9624688b577fb653af7a528848cc53d5">thread.h</a>
|
||||
</li>
|
||||
<li>cond_timedwait()
|
||||
: <a class="el" href="group__thread.html#ga4b41089ba3cd8ad0a539b42bc8b95d6b">thread.h</a>
|
||||
</li>
|
||||
<li>cond_wait()
|
||||
: <a class="el" href="group__thread.html#ga1123643838d5174ccd41f52f4169e896">thread.h</a>
|
||||
</li>
|
||||
<li>condattr_destroy()
|
||||
: <a class="el" href="group__thread.html#ga4644f4989b30ccfb2e908017c43bd0d0">thread.h</a>
|
||||
</li>
|
||||
<li>condattr_init()
|
||||
: <a class="el" href="group__thread.html#gab8073c72be896ba9d711d887a5405a74">thread.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_e"></a>- e -</h3><ul>
|
||||
<li>ensure
|
||||
: <a class="el" href="group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf">dbc.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_h"></a>- h -</h3><ul>
|
||||
<li>hide_cursor()
|
||||
: <a class="el" href="group__utils.html#ga42702791e6da9510e4f44f33d2dad8f1">utils.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_i"></a>- i -</h3><ul>
|
||||
<li>int2nstr
|
||||
: <a class="el" href="group__utils.html#ga858ece77e79fb78d3db0f1851bf7fe09">utils.h</a>
|
||||
</li>
|
||||
<li>int2nstring()
|
||||
: <a class="el" href="group__utils.html#ga824373ca8e0b2fdfe3f5c4805cf2ab7e">utils.h</a>
|
||||
</li>
|
||||
<li>int2str
|
||||
: <a class="el" href="group__utils.html#ga3c545b669dff7d67e5ed3c58233ccf4b">utils.h</a>
|
||||
</li>
|
||||
<li>invariant
|
||||
: <a class="el" href="group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725">dbc.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_l"></a>- l -</h3><ul>
|
||||
<li>length_vargs_string_list
|
||||
: <a class="el" href="group__utils.html#ga7bffda236a079c26302722c7d155f7a5">utils.h</a>
|
||||
</li>
|
||||
<li>long2nstr
|
||||
: <a class="el" href="group__utils.html#ga50cea1f8154c7c7d2abd68f1ddb33086">utils.h</a>
|
||||
</li>
|
||||
<li>long2str
|
||||
: <a class="el" href="group__utils.html#ga69373a612a7b4d264371f727217f9954">utils.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_m"></a>- m -</h3><ul>
|
||||
<li>mem_alloc()
|
||||
: <a class="el" href="group__utils.html#gadce4d1c428f979bf1cf8e1582d2f4052">utils.h</a>
|
||||
</li>
|
||||
<li>mem_free()
|
||||
: <a class="el" href="group__utils.html#gabe60e8350f3e3b07ed5002ee3449a6ae">utils.h</a>
|
||||
</li>
|
||||
<li>move_cursor()
|
||||
: <a class="el" href="group__utils.html#gad3d324aed0ec686314cb0f68dfde9853">utils.h</a>
|
||||
</li>
|
||||
<li>mutex_destroy()
|
||||
: <a class="el" href="group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01">thread.h</a>
|
||||
</li>
|
||||
<li>mutex_init()
|
||||
: <a class="el" href="group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6">thread.h</a>
|
||||
</li>
|
||||
<li>mutex_lock()
|
||||
: <a class="el" href="group__thread.html#ga87086ba0f13f6ddc479a6bc803a10c39">thread.h</a>
|
||||
</li>
|
||||
<li>mutex_trylock()
|
||||
: <a class="el" href="group__thread.html#ga8bd074884e1c92e88ca8ea0552d9a928">thread.h</a>
|
||||
</li>
|
||||
<li>mutex_unlock()
|
||||
: <a class="el" href="group__thread.html#ga95235231165ebda870afa10ba5fd6c41">thread.h</a>
|
||||
</li>
|
||||
<li>mutexattr_destroy()
|
||||
: <a class="el" href="group__thread.html#ga07bf0e49b1f2cb99d3a2955641c676d5">thread.h</a>
|
||||
</li>
|
||||
<li>mutexattr_gettype()
|
||||
: <a class="el" href="group__thread.html#gadf741e1818d53c5b7d71cd68e161b215">thread.h</a>
|
||||
</li>
|
||||
<li>mutexattr_init()
|
||||
: <a class="el" href="group__thread.html#ga9fb2733a01e8d668a2022005ea5dbebd">thread.h</a>
|
||||
</li>
|
||||
<li>mutexattr_settype()
|
||||
: <a class="el" href="group__thread.html#ga601a6a9527d7d5ee2ca2870cddc4afc2">thread.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_n"></a>- n -</h3><ul>
|
||||
<li>not_null
|
||||
: <a class="el" href="group__utils.html#gadfa0375f8178c737deae23ffa8d152f4">utils.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_p"></a>- p -</h3><ul>
|
||||
<li>perc2str
|
||||
: <a class="el" href="group__utils.html#ga59cd66180162d107cf86a51c21d7e6f5">utils.h</a>
|
||||
</li>
|
||||
<li>percentage2string()
|
||||
: <a class="el" href="group__utils.html#gacf6edf10cb84412b6bfb431ef87b56d6">utils.h</a>
|
||||
</li>
|
||||
<li>pexecl()
|
||||
: <a class="el" href="group__process.html#gae5d3e8ac00f0e788f21020699bac758a">process.h</a>
|
||||
</li>
|
||||
<li>pfork()
|
||||
: <a class="el" href="group__process.html#ga67e00aff1839b1ba68c83947593f625b">process.h</a>
|
||||
</li>
|
||||
<li>pkill()
|
||||
: <a class="el" href="group__process.html#gab546ccee89e3159ea7c23aa3a463a0d8">process.h</a>
|
||||
</li>
|
||||
<li>pmsgctl()
|
||||
: <a class="el" href="group__process.html#ga13bfac41329ec74b2aa4950f9586ae9f">process.h</a>
|
||||
</li>
|
||||
<li>pmsgget()
|
||||
: <a class="el" href="group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7">process.h</a>
|
||||
</li>
|
||||
<li>pmsgrcv()
|
||||
: <a class="el" href="group__process.html#gacd4e4161a46bfa2e1f23eb1d49aaa07b">process.h</a>
|
||||
</li>
|
||||
<li>pmsgsnd()
|
||||
: <a class="el" href="group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a">process.h</a>
|
||||
</li>
|
||||
<li>ppclose()
|
||||
: <a class="el" href="group__process.html#ga1490f6e0ca0ebf607d1f5ff431c79b68">process.h</a>
|
||||
</li>
|
||||
<li>ppipe()
|
||||
: <a class="el" href="group__process.html#ga013466fa89ac97a0db0ccd78168a8456">process.h</a>
|
||||
</li>
|
||||
<li>ppopen()
|
||||
: <a class="el" href="group__process.html#ga2d9df322812707050312aa24d15a4360">process.h</a>
|
||||
</li>
|
||||
<li>psem_close()
|
||||
: <a class="el" href="group__process.html#ga41a884c3a9d9ac6a31fc6ab27ae1d668">process.h</a>
|
||||
</li>
|
||||
<li>psem_destroy()
|
||||
: <a class="el" href="group__process.html#ga82e3d1015521711a2a6374d6c3771491">process.h</a>
|
||||
</li>
|
||||
<li>psem_down()
|
||||
: <a class="el" href="group__process.html#gac2b930e9aceda9ef276b21ae8e839c16">process.h</a>
|
||||
</li>
|
||||
<li>psem_down2()
|
||||
: <a class="el" href="group__process.html#ga47891b55ba91af98c5b45cbcf154bc20">process.h</a>
|
||||
</li>
|
||||
<li>psem_init()
|
||||
: <a class="el" href="group__process.html#gac49ddb266cec5493ebd756cd9382f99d">process.h</a>
|
||||
</li>
|
||||
<li>psem_open()
|
||||
: <a class="el" href="group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba">process.h</a>
|
||||
</li>
|
||||
<li>psem_post()
|
||||
: <a class="el" href="group__process.html#gad63921c4ec6f0845b752eb59a8935b8e">process.h</a>
|
||||
</li>
|
||||
<li>psem_timedwait()
|
||||
: <a class="el" href="group__process.html#gac8b2b3d1e18b385f10b389ce2ea734ef">process.h</a>
|
||||
</li>
|
||||
<li>psem_trywait()
|
||||
: <a class="el" href="group__process.html#ga04cb3c84545fe7707c63578e1d59b689">process.h</a>
|
||||
</li>
|
||||
<li>psem_unlink()
|
||||
: <a class="el" href="group__process.html#ga0415c9c4fab4baafef6cd2d40becd05e">process.h</a>
|
||||
</li>
|
||||
<li>psem_up()
|
||||
: <a class="el" href="group__process.html#gaa00610fec639ef123819ceee2ef00da3">process.h</a>
|
||||
</li>
|
||||
<li>psem_wait()
|
||||
: <a class="el" href="group__process.html#gae2c867f9f66e74fad44df3f32f87a8c6">process.h</a>
|
||||
</li>
|
||||
<li>psemctl()
|
||||
: <a class="el" href="group__process.html#gac42e869afba098ec9bdd77444ba790c5">process.h</a>
|
||||
</li>
|
||||
<li>psemget()
|
||||
: <a class="el" href="group__process.html#gaada159a0fe725ed843ac358be6e6a9d3">process.h</a>
|
||||
</li>
|
||||
<li>psemop()
|
||||
: <a class="el" href="group__process.html#ga0e2534c82b54573590d913c297cc4840">process.h</a>
|
||||
</li>
|
||||
<li>pshmat()
|
||||
: <a class="el" href="group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480">process.h</a>
|
||||
</li>
|
||||
<li>pshmctl()
|
||||
: <a class="el" href="group__process.html#ga3119bdf5486059aee6ec3ed65a01b319">process.h</a>
|
||||
</li>
|
||||
<li>pshmdt()
|
||||
: <a class="el" href="group__process.html#ga1682328cd34b592404ff030779b0428f">process.h</a>
|
||||
</li>
|
||||
<li>pshmget()
|
||||
: <a class="el" href="group__process.html#gaff71624be0fc9c76e0c72295721875e6">process.h</a>
|
||||
</li>
|
||||
<li>psigaction()
|
||||
: <a class="el" href="group__process.html#ga7c7f6de68bd3dea8a702668090a65854">process.h</a>
|
||||
</li>
|
||||
<li>pwait()
|
||||
: <a class="el" href="group__process.html#gad27b81fee9a0f792c4ba29fd95c967e1">process.h</a>
|
||||
</li>
|
||||
<li>pwaitpid()
|
||||
: <a class="el" href="group__process.html#gac926bd7ccd173f742b5d58f51cabcb48">process.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_r"></a>- r -</h3><ul>
|
||||
<li>random_boolean()
|
||||
: <a class="el" href="group__utils.html#gabe3e28fe49daaf3530e203c4aed1d15f">utils.h</a>
|
||||
</li>
|
||||
<li>random_int()
|
||||
: <a class="el" href="group__utils.html#gad7954e6a1b9ea073c7bc894dc5af85a9">utils.h</a>
|
||||
</li>
|
||||
<li>random_string()
|
||||
: <a class="el" href="group__utils.html#gaa820c93c2f719401b4b1ca54f6ea5c75">utils.h</a>
|
||||
</li>
|
||||
<li>require
|
||||
: <a class="el" href="group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8">dbc.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_s"></a>- s -</h3><ul>
|
||||
<li>show_cursor()
|
||||
: <a class="el" href="group__utils.html#ga1bdd62a6bef7cfd6522dc1412e162559">utils.h</a>
|
||||
</li>
|
||||
<li>string_clone()
|
||||
: <a class="el" href="group__utils.html#ga825354891d287cc86d2b4ed1b600175a">utils.h</a>
|
||||
</li>
|
||||
<li>string_concat()
|
||||
: <a class="el" href="group__utils.html#gaa23a827164f7039b9770379cbf008905">utils.h</a>
|
||||
</li>
|
||||
<li>string_count_char()
|
||||
: <a class="el" href="group__utils.html#gad643e0fcac9e59c1a171c460633e8637">utils.h</a>
|
||||
</li>
|
||||
<li>string_ends_with()
|
||||
: <a class="el" href="group__utils.html#ga1c5ba308f71c323fbbd7eb9bb34285d4">utils.h</a>
|
||||
</li>
|
||||
<li>string_list_clone()
|
||||
: <a class="el" href="group__utils.html#ga41163cf3a95e702f12506cd54ba3c70c">utils.h</a>
|
||||
</li>
|
||||
<li>string_list_free()
|
||||
: <a class="el" href="group__utils.html#gaacf77b3345bbca43767b08ec0583fe3c">utils.h</a>
|
||||
</li>
|
||||
<li>string_list_length()
|
||||
: <a class="el" href="group__utils.html#gab8050db5b87bfdee91ee92e67b063478">utils.h</a>
|
||||
</li>
|
||||
<li>string_num_columns()
|
||||
: <a class="el" href="group__utils.html#ga0ca31b2a579b6ef7c75c41324ed5367c">utils.h</a>
|
||||
</li>
|
||||
<li>string_num_lines()
|
||||
: <a class="el" href="group__utils.html#ga15630ddb64e977c8243892556feedfd8">utils.h</a>
|
||||
</li>
|
||||
<li>string_starts_with()
|
||||
: <a class="el" href="group__utils.html#ga3ec2b60d1636397119c5e0c21987f791">utils.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_t"></a>- t -</h3><ul>
|
||||
<li>thread_attr_destroy()
|
||||
: <a class="el" href="group__thread.html#gaf3a9c2c051deee01e21c75f0fa8b2e9c">thread.h</a>
|
||||
</li>
|
||||
<li>thread_attr_getdetachstate()
|
||||
: <a class="el" href="group__thread.html#gaae83c8617612c1bb481fec2b382ac9c4">thread.h</a>
|
||||
</li>
|
||||
<li>thread_attr_init()
|
||||
: <a class="el" href="group__thread.html#gaaf2db7012069f0006e7ffaf257d8ccc6">thread.h</a>
|
||||
</li>
|
||||
<li>thread_attr_setdetachstate()
|
||||
: <a class="el" href="group__thread.html#gabc82fea1785fc82aeb2f43cdd77b9b0f">thread.h</a>
|
||||
</li>
|
||||
<li>thread_cancel()
|
||||
: <a class="el" href="group__thread.html#ga1b3cb53565eabe02a36e000e5244dfd1">thread.h</a>
|
||||
</li>
|
||||
<li>thread_create()
|
||||
: <a class="el" href="group__thread.html#ga3a0f9920a321b54c41c098d3461d3889">thread.h</a>
|
||||
</li>
|
||||
<li>thread_detach()
|
||||
: <a class="el" href="group__thread.html#ga86aa7989874009c886bea9d41700e25c">thread.h</a>
|
||||
</li>
|
||||
<li>thread_equal()
|
||||
: <a class="el" href="group__thread.html#gadca8bdcec91b8985370d904591d342b8">thread.h</a>
|
||||
</li>
|
||||
<li>thread_exit()
|
||||
: <a class="el" href="group__thread.html#ga19b16adf05364471bae2840aa564329a">thread.h</a>
|
||||
</li>
|
||||
<li>thread_getspecific()
|
||||
: <a class="el" href="group__thread.html#ga0d207f1bb2e1d493b68a026b8650cb16">thread.h</a>
|
||||
</li>
|
||||
<li>thread_join()
|
||||
: <a class="el" href="group__thread.html#ga2b2370a45c1518f777493526b2e4f46d">thread.h</a>
|
||||
</li>
|
||||
<li>thread_key_create()
|
||||
: <a class="el" href="group__thread.html#ga7df1983f57dca40a86a55d215d13d42b">thread.h</a>
|
||||
</li>
|
||||
<li>thread_key_delete()
|
||||
: <a class="el" href="group__thread.html#ga65a50dfc97c087a28cb916e0f30f760e">thread.h</a>
|
||||
</li>
|
||||
<li>thread_once()
|
||||
: <a class="el" href="group__thread.html#gad0428e8a0809704f4b3d682f26d3ef1c">thread.h</a>
|
||||
</li>
|
||||
<li>thread_sched_yield()
|
||||
: <a class="el" href="group__thread.html#ga952c63101c667d247f0923b609710c72">thread.h</a>
|
||||
</li>
|
||||
<li>thread_self()
|
||||
: <a class="el" href="group__thread.html#ga606fdef53f997c231e0e1e9e54b350d4">thread.h</a>
|
||||
</li>
|
||||
<li>thread_setcancelstate()
|
||||
: <a class="el" href="group__thread.html#ga98baffe08beec792f3428ae9ddad966e">thread.h</a>
|
||||
</li>
|
||||
<li>thread_setcanceltype()
|
||||
: <a class="el" href="group__thread.html#gab4ec114c7b59f8f4185bac648b256d0c">thread.h</a>
|
||||
</li>
|
||||
<li>thread_setspecific()
|
||||
: <a class="el" href="group__thread.html#ga3008b033f2830e79179a882a2b74c8ba">thread.h</a>
|
||||
</li>
|
||||
<li>thread_testcancel()
|
||||
: <a class="el" href="group__thread.html#ga81bdb13d62e16ad7cb3cbd263c9a5671">thread.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,127 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: Globals</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('globals_defs.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>check
|
||||
: <a class="el" href="group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221">dbc.h</a>
|
||||
</li>
|
||||
<li>concat_2str
|
||||
: <a class="el" href="group__utils.html#ga22347cbf977a0300726f06257edd79d6">utils.h</a>
|
||||
</li>
|
||||
<li>concat_3str
|
||||
: <a class="el" href="group__utils.html#ga123e40006d54612c48c2660432dfeb23">utils.h</a>
|
||||
</li>
|
||||
<li>concat_4str
|
||||
: <a class="el" href="group__utils.html#ga69037999e65cdb42d39988e0fec48af4">utils.h</a>
|
||||
</li>
|
||||
<li>concat_5str
|
||||
: <a class="el" href="group__utils.html#ga580d1897bc7a8cef16d5a16a2373b876">utils.h</a>
|
||||
</li>
|
||||
<li>concat_6str
|
||||
: <a class="el" href="group__utils.html#ga34f8c2fcee597a99c5f4c66f2119bca9">utils.h</a>
|
||||
</li>
|
||||
<li>concat_7str
|
||||
: <a class="el" href="group__utils.html#ga01d1ea65eb6780d91705484dd46833bf">utils.h</a>
|
||||
</li>
|
||||
<li>ensure
|
||||
: <a class="el" href="group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf">dbc.h</a>
|
||||
</li>
|
||||
<li>int2nstr
|
||||
: <a class="el" href="group__utils.html#ga858ece77e79fb78d3db0f1851bf7fe09">utils.h</a>
|
||||
</li>
|
||||
<li>int2str
|
||||
: <a class="el" href="group__utils.html#ga3c545b669dff7d67e5ed3c58233ccf4b">utils.h</a>
|
||||
</li>
|
||||
<li>invariant
|
||||
: <a class="el" href="group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725">dbc.h</a>
|
||||
</li>
|
||||
<li>length_vargs_string_list
|
||||
: <a class="el" href="group__utils.html#ga7bffda236a079c26302722c7d155f7a5">utils.h</a>
|
||||
</li>
|
||||
<li>long2nstr
|
||||
: <a class="el" href="group__utils.html#ga50cea1f8154c7c7d2abd68f1ddb33086">utils.h</a>
|
||||
</li>
|
||||
<li>long2str
|
||||
: <a class="el" href="group__utils.html#ga69373a612a7b4d264371f727217f9954">utils.h</a>
|
||||
</li>
|
||||
<li>not_null
|
||||
: <a class="el" href="group__utils.html#gadfa0375f8178c737deae23ffa8d152f4">utils.h</a>
|
||||
</li>
|
||||
<li>perc2str
|
||||
: <a class="el" href="group__utils.html#ga59cd66180162d107cf86a51c21d7e6f5">utils.h</a>
|
||||
</li>
|
||||
<li>require
|
||||
: <a class="el" href="group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8">dbc.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,376 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: Globals</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('globals_func.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="contents">
|
||||
 
|
||||
|
||||
<h3><a id="index_c"></a>- c -</h3><ul>
|
||||
<li>clear_console()
|
||||
: <a class="el" href="group__utils.html#ga3cffe15b7e5d10a108f1734a9640a2c7">utils.h</a>
|
||||
</li>
|
||||
<li>cond_broadcast()
|
||||
: <a class="el" href="group__thread.html#ga6459039ab27da7237dda2bbc866eb2d0">thread.h</a>
|
||||
</li>
|
||||
<li>cond_destroy()
|
||||
: <a class="el" href="group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80">thread.h</a>
|
||||
</li>
|
||||
<li>cond_init()
|
||||
: <a class="el" href="group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad">thread.h</a>
|
||||
</li>
|
||||
<li>cond_signal()
|
||||
: <a class="el" href="group__thread.html#ga9624688b577fb653af7a528848cc53d5">thread.h</a>
|
||||
</li>
|
||||
<li>cond_timedwait()
|
||||
: <a class="el" href="group__thread.html#ga8cd2040836c30e4f0ea17abe4f66b8e2">thread.h</a>
|
||||
</li>
|
||||
<li>cond_wait()
|
||||
: <a class="el" href="group__thread.html#ga1123643838d5174ccd41f52f4169e896">thread.h</a>
|
||||
</li>
|
||||
<li>condattr_destroy()
|
||||
: <a class="el" href="group__thread.html#ga4644f4989b30ccfb2e908017c43bd0d0">thread.h</a>
|
||||
</li>
|
||||
<li>condattr_init()
|
||||
: <a class="el" href="group__thread.html#gab8073c72be896ba9d711d887a5405a74">thread.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_h"></a>- h -</h3><ul>
|
||||
<li>hide_cursor()
|
||||
: <a class="el" href="group__utils.html#ga42702791e6da9510e4f44f33d2dad8f1">utils.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_i"></a>- i -</h3><ul>
|
||||
<li>int2nstring()
|
||||
: <a class="el" href="group__utils.html#ga824373ca8e0b2fdfe3f5c4805cf2ab7e">utils.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_m"></a>- m -</h3><ul>
|
||||
<li>mem_alloc()
|
||||
: <a class="el" href="group__utils.html#gadce4d1c428f979bf1cf8e1582d2f4052">utils.h</a>
|
||||
</li>
|
||||
<li>mem_free()
|
||||
: <a class="el" href="group__utils.html#gabe60e8350f3e3b07ed5002ee3449a6ae">utils.h</a>
|
||||
</li>
|
||||
<li>move_cursor()
|
||||
: <a class="el" href="group__utils.html#gad3d324aed0ec686314cb0f68dfde9853">utils.h</a>
|
||||
</li>
|
||||
<li>mutex_destroy()
|
||||
: <a class="el" href="group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01">thread.h</a>
|
||||
</li>
|
||||
<li>mutex_init()
|
||||
: <a class="el" href="group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6">thread.h</a>
|
||||
</li>
|
||||
<li>mutex_lock()
|
||||
: <a class="el" href="group__thread.html#ga87086ba0f13f6ddc479a6bc803a10c39">thread.h</a>
|
||||
</li>
|
||||
<li>mutex_trylock()
|
||||
: <a class="el" href="group__thread.html#ga8bd074884e1c92e88ca8ea0552d9a928">thread.h</a>
|
||||
</li>
|
||||
<li>mutex_unlock()
|
||||
: <a class="el" href="group__thread.html#ga95235231165ebda870afa10ba5fd6c41">thread.h</a>
|
||||
</li>
|
||||
<li>mutexattr_destroy()
|
||||
: <a class="el" href="group__thread.html#ga07bf0e49b1f2cb99d3a2955641c676d5">thread.h</a>
|
||||
</li>
|
||||
<li>mutexattr_gettype()
|
||||
: <a class="el" href="group__thread.html#gadf741e1818d53c5b7d71cd68e161b215">thread.h</a>
|
||||
</li>
|
||||
<li>mutexattr_init()
|
||||
: <a class="el" href="group__thread.html#ga9fb2733a01e8d668a2022005ea5dbebd">thread.h</a>
|
||||
</li>
|
||||
<li>mutexattr_settype()
|
||||
: <a class="el" href="group__thread.html#ga601a6a9527d7d5ee2ca2870cddc4afc2">thread.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_p"></a>- p -</h3><ul>
|
||||
<li>percentage2string()
|
||||
: <a class="el" href="group__utils.html#gacf6edf10cb84412b6bfb431ef87b56d6">utils.h</a>
|
||||
</li>
|
||||
<li>pexecl()
|
||||
: <a class="el" href="group__process.html#gae5d3e8ac00f0e788f21020699bac758a">process.h</a>
|
||||
</li>
|
||||
<li>pfork()
|
||||
: <a class="el" href="group__process.html#ga67e00aff1839b1ba68c83947593f625b">process.h</a>
|
||||
</li>
|
||||
<li>pkill()
|
||||
: <a class="el" href="group__process.html#gab546ccee89e3159ea7c23aa3a463a0d8">process.h</a>
|
||||
</li>
|
||||
<li>pmsgctl()
|
||||
: <a class="el" href="group__process.html#ga13bfac41329ec74b2aa4950f9586ae9f">process.h</a>
|
||||
</li>
|
||||
<li>pmsgget()
|
||||
: <a class="el" href="group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7">process.h</a>
|
||||
</li>
|
||||
<li>pmsgrcv()
|
||||
: <a class="el" href="group__process.html#gacd4e4161a46bfa2e1f23eb1d49aaa07b">process.h</a>
|
||||
</li>
|
||||
<li>pmsgsnd()
|
||||
: <a class="el" href="group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a">process.h</a>
|
||||
</li>
|
||||
<li>ppclose()
|
||||
: <a class="el" href="group__process.html#ga1490f6e0ca0ebf607d1f5ff431c79b68">process.h</a>
|
||||
</li>
|
||||
<li>ppipe()
|
||||
: <a class="el" href="group__process.html#ga013466fa89ac97a0db0ccd78168a8456">process.h</a>
|
||||
</li>
|
||||
<li>ppopen()
|
||||
: <a class="el" href="group__process.html#ga2d9df322812707050312aa24d15a4360">process.h</a>
|
||||
</li>
|
||||
<li>psem_close()
|
||||
: <a class="el" href="group__process.html#ga41a884c3a9d9ac6a31fc6ab27ae1d668">process.h</a>
|
||||
</li>
|
||||
<li>psem_destroy()
|
||||
: <a class="el" href="group__process.html#ga82e3d1015521711a2a6374d6c3771491">process.h</a>
|
||||
</li>
|
||||
<li>psem_down()
|
||||
: <a class="el" href="group__process.html#gac2b930e9aceda9ef276b21ae8e839c16">process.h</a>
|
||||
</li>
|
||||
<li>psem_down2()
|
||||
: <a class="el" href="group__process.html#ga47891b55ba91af98c5b45cbcf154bc20">process.h</a>
|
||||
</li>
|
||||
<li>psem_init()
|
||||
: <a class="el" href="group__process.html#gac49ddb266cec5493ebd756cd9382f99d">process.h</a>
|
||||
</li>
|
||||
<li>psem_open()
|
||||
: <a class="el" href="group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba">process.h</a>
|
||||
</li>
|
||||
<li>psem_post()
|
||||
: <a class="el" href="group__process.html#gad63921c4ec6f0845b752eb59a8935b8e">process.h</a>
|
||||
</li>
|
||||
<li>psem_timedwait()
|
||||
: <a class="el" href="group__process.html#gac8b2b3d1e18b385f10b389ce2ea734ef">process.h</a>
|
||||
</li>
|
||||
<li>psem_trywait()
|
||||
: <a class="el" href="group__process.html#ga04cb3c84545fe7707c63578e1d59b689">process.h</a>
|
||||
</li>
|
||||
<li>psem_unlink()
|
||||
: <a class="el" href="group__process.html#ga0415c9c4fab4baafef6cd2d40becd05e">process.h</a>
|
||||
</li>
|
||||
<li>psem_up()
|
||||
: <a class="el" href="group__process.html#gaa00610fec639ef123819ceee2ef00da3">process.h</a>
|
||||
</li>
|
||||
<li>psem_wait()
|
||||
: <a class="el" href="group__process.html#gae2c867f9f66e74fad44df3f32f87a8c6">process.h</a>
|
||||
</li>
|
||||
<li>psemctl()
|
||||
: <a class="el" href="group__process.html#gac42e869afba098ec9bdd77444ba790c5">process.h</a>
|
||||
</li>
|
||||
<li>psemget()
|
||||
: <a class="el" href="group__process.html#gaada159a0fe725ed843ac358be6e6a9d3">process.h</a>
|
||||
</li>
|
||||
<li>psemop()
|
||||
: <a class="el" href="group__process.html#ga0e2534c82b54573590d913c297cc4840">process.h</a>
|
||||
</li>
|
||||
<li>pshmat()
|
||||
: <a class="el" href="group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480">process.h</a>
|
||||
</li>
|
||||
<li>pshmctl()
|
||||
: <a class="el" href="group__process.html#ga3119bdf5486059aee6ec3ed65a01b319">process.h</a>
|
||||
</li>
|
||||
<li>pshmdt()
|
||||
: <a class="el" href="group__process.html#ga1682328cd34b592404ff030779b0428f">process.h</a>
|
||||
</li>
|
||||
<li>pshmget()
|
||||
: <a class="el" href="group__process.html#gaff71624be0fc9c76e0c72295721875e6">process.h</a>
|
||||
</li>
|
||||
<li>psigaction()
|
||||
: <a class="el" href="group__process.html#ga7c7f6de68bd3dea8a702668090a65854">process.h</a>
|
||||
</li>
|
||||
<li>pwait()
|
||||
: <a class="el" href="group__process.html#gad27b81fee9a0f792c4ba29fd95c967e1">process.h</a>
|
||||
</li>
|
||||
<li>pwaitpid()
|
||||
: <a class="el" href="group__process.html#gac926bd7ccd173f742b5d58f51cabcb48">process.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_r"></a>- r -</h3><ul>
|
||||
<li>random_boolean()
|
||||
: <a class="el" href="group__utils.html#gabe3e28fe49daaf3530e203c4aed1d15f">utils.h</a>
|
||||
</li>
|
||||
<li>random_int()
|
||||
: <a class="el" href="group__utils.html#gad7954e6a1b9ea073c7bc894dc5af85a9">utils.h</a>
|
||||
</li>
|
||||
<li>random_string()
|
||||
: <a class="el" href="group__utils.html#gaa820c93c2f719401b4b1ca54f6ea5c75">utils.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_s"></a>- s -</h3><ul>
|
||||
<li>show_cursor()
|
||||
: <a class="el" href="group__utils.html#ga1bdd62a6bef7cfd6522dc1412e162559">utils.h</a>
|
||||
</li>
|
||||
<li>string_clone()
|
||||
: <a class="el" href="group__utils.html#ga825354891d287cc86d2b4ed1b600175a">utils.h</a>
|
||||
</li>
|
||||
<li>string_concat()
|
||||
: <a class="el" href="group__utils.html#gaa23a827164f7039b9770379cbf008905">utils.h</a>
|
||||
</li>
|
||||
<li>string_count_char()
|
||||
: <a class="el" href="group__utils.html#gad643e0fcac9e59c1a171c460633e8637">utils.h</a>
|
||||
</li>
|
||||
<li>string_ends_with()
|
||||
: <a class="el" href="group__utils.html#ga1c5ba308f71c323fbbd7eb9bb34285d4">utils.h</a>
|
||||
</li>
|
||||
<li>string_list_clone()
|
||||
: <a class="el" href="group__utils.html#ga41163cf3a95e702f12506cd54ba3c70c">utils.h</a>
|
||||
</li>
|
||||
<li>string_list_free()
|
||||
: <a class="el" href="group__utils.html#gaacf77b3345bbca43767b08ec0583fe3c">utils.h</a>
|
||||
</li>
|
||||
<li>string_list_length()
|
||||
: <a class="el" href="group__utils.html#gab8050db5b87bfdee91ee92e67b063478">utils.h</a>
|
||||
</li>
|
||||
<li>string_num_columns()
|
||||
: <a class="el" href="group__utils.html#ga0ca31b2a579b6ef7c75c41324ed5367c">utils.h</a>
|
||||
</li>
|
||||
<li>string_num_lines()
|
||||
: <a class="el" href="group__utils.html#ga15630ddb64e977c8243892556feedfd8">utils.h</a>
|
||||
</li>
|
||||
<li>string_starts_with()
|
||||
: <a class="el" href="group__utils.html#ga3ec2b60d1636397119c5e0c21987f791">utils.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_t"></a>- t -</h3><ul>
|
||||
<li>thread_attr_destroy()
|
||||
: <a class="el" href="group__thread.html#gaf3a9c2c051deee01e21c75f0fa8b2e9c">thread.h</a>
|
||||
</li>
|
||||
<li>thread_attr_getdetachstate()
|
||||
: <a class="el" href="group__thread.html#gaae83c8617612c1bb481fec2b382ac9c4">thread.h</a>
|
||||
</li>
|
||||
<li>thread_attr_init()
|
||||
: <a class="el" href="group__thread.html#gaaf2db7012069f0006e7ffaf257d8ccc6">thread.h</a>
|
||||
</li>
|
||||
<li>thread_attr_setdetachstate()
|
||||
: <a class="el" href="group__thread.html#gabc82fea1785fc82aeb2f43cdd77b9b0f">thread.h</a>
|
||||
</li>
|
||||
<li>thread_cancel()
|
||||
: <a class="el" href="group__thread.html#ga1b3cb53565eabe02a36e000e5244dfd1">thread.h</a>
|
||||
</li>
|
||||
<li>thread_create()
|
||||
: <a class="el" href="group__thread.html#ga3a0f9920a321b54c41c098d3461d3889">thread.h</a>
|
||||
</li>
|
||||
<li>thread_detach()
|
||||
: <a class="el" href="group__thread.html#ga86aa7989874009c886bea9d41700e25c">thread.h</a>
|
||||
</li>
|
||||
<li>thread_equal()
|
||||
: <a class="el" href="group__thread.html#gadca8bdcec91b8985370d904591d342b8">thread.h</a>
|
||||
</li>
|
||||
<li>thread_exit()
|
||||
: <a class="el" href="group__thread.html#ga19b16adf05364471bae2840aa564329a">thread.h</a>
|
||||
</li>
|
||||
<li>thread_getspecific()
|
||||
: <a class="el" href="group__thread.html#ga0d207f1bb2e1d493b68a026b8650cb16">thread.h</a>
|
||||
</li>
|
||||
<li>thread_join()
|
||||
: <a class="el" href="group__thread.html#ga2b2370a45c1518f777493526b2e4f46d">thread.h</a>
|
||||
</li>
|
||||
<li>thread_key_create()
|
||||
: <a class="el" href="group__thread.html#ga7df1983f57dca40a86a55d215d13d42b">thread.h</a>
|
||||
</li>
|
||||
<li>thread_key_delete()
|
||||
: <a class="el" href="group__thread.html#ga65a50dfc97c087a28cb916e0f30f760e">thread.h</a>
|
||||
</li>
|
||||
<li>thread_once()
|
||||
: <a class="el" href="group__thread.html#gad0428e8a0809704f4b3d682f26d3ef1c">thread.h</a>
|
||||
</li>
|
||||
<li>thread_sched_yield()
|
||||
: <a class="el" href="group__thread.html#ga952c63101c667d247f0923b609710c72">thread.h</a>
|
||||
</li>
|
||||
<li>thread_self()
|
||||
: <a class="el" href="group__thread.html#ga606fdef53f997c231e0e1e9e54b350d4">thread.h</a>
|
||||
</li>
|
||||
<li>thread_setcancelstate()
|
||||
: <a class="el" href="group__thread.html#ga98baffe08beec792f3428ae9ddad966e">thread.h</a>
|
||||
</li>
|
||||
<li>thread_setcanceltype()
|
||||
: <a class="el" href="group__thread.html#gab4ec114c7b59f8f4185bac648b256d0c">thread.h</a>
|
||||
</li>
|
||||
<li>thread_setspecific()
|
||||
: <a class="el" href="group__thread.html#ga3008b033f2830e79179a882a2b74c8ba">thread.h</a>
|
||||
</li>
|
||||
<li>thread_testcancel()
|
||||
: <a class="el" href="group__thread.html#ga81bdb13d62e16ad7cb3cbd263c9a5671">thread.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,305 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: DbC</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('group___db_c.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#files">Files</a> |
|
||||
<a href="#define-members">Macros</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">DbC</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Design-by-Contract module.
|
||||
<a href="#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
|
||||
Files</h2></td></tr>
|
||||
<tr class="memitem:dbc_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="dbc_8h.html">dbc.h</a></td></tr>
|
||||
<tr class="memdesc:dbc_8h"><td class="mdescLeft"> </td><td class="mdescRight">Design-by-Contract module. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:gac101c8ba449f6f8c71b3789a9c489221"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221">check</a>(condition, message)</td></tr>
|
||||
<tr class="memdesc:gac101c8ba449f6f8c71b3789a9c489221"><td class="mdescLeft"> </td><td class="mdescRight">Checks the verification of an general algorithm assertion. <a href="group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac101c8ba449f6f8c71b3789a9c489221"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5bf1825f80465097d4b753a001cf1af8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8">require</a>(condition, message)</td></tr>
|
||||
<tr class="memdesc:ga5bf1825f80465097d4b753a001cf1af8"><td class="mdescLeft"> </td><td class="mdescRight">Checks the verification of a precondition. <a href="group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga5bf1825f80465097d4b753a001cf1af8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5d17c602c4f191371a5fec5af7adc3cf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf">ensure</a>(condition, message)</td></tr>
|
||||
<tr class="memdesc:ga5d17c602c4f191371a5fec5af7adc3cf"><td class="mdescLeft"> </td><td class="mdescRight">Checks the verification of a postcondition. <a href="group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga5d17c602c4f191371a5fec5af7adc3cf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf9d59b04beef1bf139e10fc44c6f9725"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725">invariant</a>(condition, message)</td></tr>
|
||||
<tr class="memdesc:gaf9d59b04beef1bf139e10fc44c6f9725"><td class="mdescLeft"> </td><td class="mdescRight">Checks the verification of an invariant. <a href="group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaf9d59b04beef1bf139e10fc44c6f9725"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<p>Design-by-Contract module. </p>
|
||||
<p>This module gives a better support for DbC in C++.</p>
|
||||
<p>When compared with <code>assert.h</code> this module offers the following functionalities:</p><ul>
|
||||
<li>separates different assertion types (preconditions, postconditions, invariants, and others);</li>
|
||||
<li>augments assert with error message strings;</li>
|
||||
<li>implements two error handling policies:<ol type="1">
|
||||
<li>EXIT_POLICY (default): describes the failed assertion in <code>stderr</code> (with the identification and the precise location of the assertion), generates a segmentation fault (enabling a stack trace within a debugger like <code>gdb</code>), and exits program execution;</li>
|
||||
<li>EXCEPTION_POLICY: throws a <code>char*</code> exception with the description of the failed assertion.</li>
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Debug settings:</p><ul>
|
||||
<li>As happens with <code>assert.h</code>, this module accepts <b><code>NDEBUG</code></b> macro definition to disable all assertion run-time verification.</li>
|
||||
<li>Also, each assertion type verification can be disabled with macros: <b><code>NDEBUG_CHECKS</code></b>, <b><code>NDEBUG_PRECONDITIONS</code></b>, <b><code>NDEBUG_POSTCONDITIONS</code></b>, and <b><code>NDEBUG_INVARIANTS</code></b>.</li>
|
||||
<li>A special (high priority) macro named <b><code>DEBUG_ONLY_PRECONDITIONS</code></b> ensures that only precondition debugging remains active (regardless of other debug definitions).</li>
|
||||
</ul>
|
||||
<dl class="section author"><dt>Author</dt><dd>Miguel Oliveira e Silva, 2018 </dd></dl>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="gac101c8ba449f6f8c71b3789a9c489221"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gac101c8ba449f6f8c71b3789a9c489221">◆ </a></span>check</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define check</td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"> </td>
|
||||
<td class="paramname">condition, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"> </td>
|
||||
<td class="paramname">message </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<b>Value:</b><div class="fragment"><div class="line"> <span class="keywordflow">if</span> (!(condition)) \</div>
|
||||
<div class="line"> do { \</div>
|
||||
<div class="line"> fprintf (stderr, <span class="stringliteral">"Assertion fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n"</span>, \</div>
|
||||
<div class="line"> message[0] ? <span class="stringliteral">": "</span> : <span class="stringliteral">""</span>, message, #condition, __FUNCTION__, __LINE__ , __FILE__); \</div>
|
||||
<div class="line"> *((<span class="keywordtype">int</span>*)0) = 0; \</div>
|
||||
<div class="line"> abort (); \</div>
|
||||
<div class="line"> } <span class="keywordflow">while</span> (0)</div>
|
||||
</div><!-- fragment -->
|
||||
<p>Checks the verification of an general algorithm assertion. </p>
|
||||
<p>This assertion verification can be disabled at compile time by defining the macro <b><code>NDEBUG_CHECKS</code></b>.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">condition</td><td>expression to assert its truthness </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>text to be presented with error information when the assertion fails </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga5bf1825f80465097d4b753a001cf1af8"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga5bf1825f80465097d4b753a001cf1af8">◆ </a></span>require</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define require</td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"> </td>
|
||||
<td class="paramname">condition, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"> </td>
|
||||
<td class="paramname">message </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<b>Value:</b><div class="fragment"><div class="line"> <span class="keywordflow">if</span> (!(condition)) \</div>
|
||||
<div class="line"> do { \</div>
|
||||
<div class="line"> fprintf (stderr, <span class="stringliteral">"Precondition fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n"</span>, \</div>
|
||||
<div class="line"> message[0] ? <span class="stringliteral">": "</span> : <span class="stringliteral">""</span>, message, #condition, __FUNCTION__, __LINE__ , __FILE__); \</div>
|
||||
<div class="line"> *((<span class="keywordtype">int</span>*)0) = 0; \</div>
|
||||
<div class="line"> abort (); \</div>
|
||||
<div class="line"> } <span class="keywordflow">while</span> (0)</div>
|
||||
</div><!-- fragment -->
|
||||
<p>Checks the verification of a precondition. </p>
|
||||
<p>This assertion verification can be disabled at compile time by defining the macro <b><code>NDEBUG_PRECONDITIONS</code></b>.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">condition</td><td>expression to assert its truthness </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>text to be presented with error information when the assertion fails </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga5d17c602c4f191371a5fec5af7adc3cf"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga5d17c602c4f191371a5fec5af7adc3cf">◆ </a></span>ensure</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define ensure</td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"> </td>
|
||||
<td class="paramname">condition, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"> </td>
|
||||
<td class="paramname">message </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<b>Value:</b><div class="fragment"><div class="line"> <span class="keywordflow">if</span> (!(condition)) \</div>
|
||||
<div class="line"> do { \</div>
|
||||
<div class="line"> fprintf (stderr, <span class="stringliteral">"Postcondition fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n"</span>, \</div>
|
||||
<div class="line"> message[0] ? <span class="stringliteral">": "</span> : <span class="stringliteral">""</span>, message, #condition, __FUNCTION__, __LINE__ , __FILE__); \</div>
|
||||
<div class="line"> *((<span class="keywordtype">int</span>*)0) = 0; \</div>
|
||||
<div class="line"> abort (); \</div>
|
||||
<div class="line"> } <span class="keywordflow">while</span> (0)</div>
|
||||
</div><!-- fragment -->
|
||||
<p>Checks the verification of a postcondition. </p>
|
||||
<p>This assertion verification can be disabled at compile time by defining the macro <b><code>NDEBUG_POSTCONDITIONS</code></b>.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">condition</td><td>expression to assert its truthness </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>text to be presented with error information when the assertion fails </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaf9d59b04beef1bf139e10fc44c6f9725"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaf9d59b04beef1bf139e10fc44c6f9725">◆ </a></span>invariant</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define invariant</td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"> </td>
|
||||
<td class="paramname">condition, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"> </td>
|
||||
<td class="paramname">message </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<b>Value:</b><div class="fragment"><div class="line"> <span class="keywordflow">if</span> (!(condition)) \</div>
|
||||
<div class="line"> do { \</div>
|
||||
<div class="line"> fprintf (stderr, <span class="stringliteral">"Invariant fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n"</span>, \</div>
|
||||
<div class="line"> message[0] ? <span class="stringliteral">": "</span> : <span class="stringliteral">""</span>, message, #condition, __FUNCTION__, __LINE__ , __FILE__); \</div>
|
||||
<div class="line"> *((<span class="keywordtype">int</span>*)0) = 0; \</div>
|
||||
<div class="line"> abort (); \</div>
|
||||
<div class="line"> } <span class="keywordflow">while</span> (0)</div>
|
||||
</div><!-- fragment -->
|
||||
<p>Checks the verification of an invariant. </p>
|
||||
<p>This assertion verification can be disabled at compile time by defining the macro <b><code>NDEBUG_INVARIANTS</code></b>.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">condition</td><td>expression to assert its truthness </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>text to be presented with error information when the assertion fails </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,8 +0,0 @@
|
|||
var group___db_c =
|
||||
[
|
||||
[ "dbc.h", "dbc_8h.html", null ],
|
||||
[ "check", "group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221", null ],
|
||||
[ "require", "group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8", null ],
|
||||
[ "ensure", "group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf", null ],
|
||||
[ "invariant", "group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725", null ]
|
||||
];
|
|
@ -1,36 +0,0 @@
|
|||
var group__process =
|
||||
[
|
||||
[ "process.h", "process_8h.html", null ],
|
||||
[ "pfork", "group__process.html#ga67e00aff1839b1ba68c83947593f625b", null ],
|
||||
[ "pwait", "group__process.html#gad27b81fee9a0f792c4ba29fd95c967e1", null ],
|
||||
[ "pwaitpid", "group__process.html#gac926bd7ccd173f742b5d58f51cabcb48", null ],
|
||||
[ "pkill", "group__process.html#gab546ccee89e3159ea7c23aa3a463a0d8", null ],
|
||||
[ "pexecl", "group__process.html#gae5d3e8ac00f0e788f21020699bac758a", null ],
|
||||
[ "psigaction", "group__process.html#ga7c7f6de68bd3dea8a702668090a65854", null ],
|
||||
[ "pshmget", "group__process.html#gaff71624be0fc9c76e0c72295721875e6", null ],
|
||||
[ "pshmctl", "group__process.html#ga3119bdf5486059aee6ec3ed65a01b319", null ],
|
||||
[ "pshmat", "group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480", null ],
|
||||
[ "pshmdt", "group__process.html#ga1682328cd34b592404ff030779b0428f", null ],
|
||||
[ "psemget", "group__process.html#gaada159a0fe725ed843ac358be6e6a9d3", null ],
|
||||
[ "psemctl", "group__process.html#gac42e869afba098ec9bdd77444ba790c5", null ],
|
||||
[ "psemop", "group__process.html#ga0e2534c82b54573590d913c297cc4840", null ],
|
||||
[ "psem_up", "group__process.html#gaa00610fec639ef123819ceee2ef00da3", null ],
|
||||
[ "psem_down", "group__process.html#gac2b930e9aceda9ef276b21ae8e839c16", null ],
|
||||
[ "psem_down2", "group__process.html#ga47891b55ba91af98c5b45cbcf154bc20", null ],
|
||||
[ "pmsgget", "group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7", null ],
|
||||
[ "pmsgctl", "group__process.html#ga13bfac41329ec74b2aa4950f9586ae9f", null ],
|
||||
[ "pmsgsnd", "group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a", null ],
|
||||
[ "pmsgrcv", "group__process.html#gacd4e4161a46bfa2e1f23eb1d49aaa07b", null ],
|
||||
[ "psem_open", "group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba", null ],
|
||||
[ "psem_close", "group__process.html#ga41a884c3a9d9ac6a31fc6ab27ae1d668", null ],
|
||||
[ "psem_unlink", "group__process.html#ga0415c9c4fab4baafef6cd2d40becd05e", null ],
|
||||
[ "psem_init", "group__process.html#gac49ddb266cec5493ebd756cd9382f99d", null ],
|
||||
[ "psem_destroy", "group__process.html#ga82e3d1015521711a2a6374d6c3771491", null ],
|
||||
[ "psem_wait", "group__process.html#gae2c867f9f66e74fad44df3f32f87a8c6", null ],
|
||||
[ "psem_trywait", "group__process.html#ga04cb3c84545fe7707c63578e1d59b689", null ],
|
||||
[ "psem_timedwait", "group__process.html#gac8b2b3d1e18b385f10b389ce2ea734ef", null ],
|
||||
[ "psem_post", "group__process.html#gad63921c4ec6f0845b752eb59a8935b8e", null ],
|
||||
[ "ppipe", "group__process.html#ga013466fa89ac97a0db0ccd78168a8456", null ],
|
||||
[ "ppopen", "group__process.html#ga2d9df322812707050312aa24d15a4360", null ],
|
||||
[ "ppclose", "group__process.html#ga1490f6e0ca0ebf607d1f5ff431c79b68", null ]
|
||||
];
|
|
@ -1,42 +0,0 @@
|
|||
var group__thread =
|
||||
[
|
||||
[ "thread.h", "thread_8h.html", null ],
|
||||
[ "thread_equal", "group__thread.html#gadca8bdcec91b8985370d904591d342b8", null ],
|
||||
[ "thread_create", "group__thread.html#ga3a0f9920a321b54c41c098d3461d3889", null ],
|
||||
[ "thread_self", "group__thread.html#ga606fdef53f997c231e0e1e9e54b350d4", null ],
|
||||
[ "thread_sched_yield", "group__thread.html#ga952c63101c667d247f0923b609710c72", null ],
|
||||
[ "thread_exit", "group__thread.html#ga19b16adf05364471bae2840aa564329a", null ],
|
||||
[ "thread_detach", "group__thread.html#ga86aa7989874009c886bea9d41700e25c", null ],
|
||||
[ "thread_join", "group__thread.html#ga2b2370a45c1518f777493526b2e4f46d", null ],
|
||||
[ "mutex_init", "group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6", null ],
|
||||
[ "mutex_destroy", "group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01", null ],
|
||||
[ "mutex_lock", "group__thread.html#ga87086ba0f13f6ddc479a6bc803a10c39", null ],
|
||||
[ "mutex_trylock", "group__thread.html#ga8bd074884e1c92e88ca8ea0552d9a928", null ],
|
||||
[ "mutex_unlock", "group__thread.html#ga95235231165ebda870afa10ba5fd6c41", null ],
|
||||
[ "cond_init", "group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad", null ],
|
||||
[ "cond_destroy", "group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80", null ],
|
||||
[ "cond_wait", "group__thread.html#ga1123643838d5174ccd41f52f4169e896", null ],
|
||||
[ "cond_timedwait", "group__thread.html#ga8cd2040836c30e4f0ea17abe4f66b8e2", null ],
|
||||
[ "cond_timedwait", "group__thread.html#ga4b41089ba3cd8ad0a539b42bc8b95d6b", null ],
|
||||
[ "cond_signal", "group__thread.html#ga9624688b577fb653af7a528848cc53d5", null ],
|
||||
[ "cond_broadcast", "group__thread.html#ga6459039ab27da7237dda2bbc866eb2d0", null ],
|
||||
[ "thread_once", "group__thread.html#gad0428e8a0809704f4b3d682f26d3ef1c", null ],
|
||||
[ "thread_key_create", "group__thread.html#ga7df1983f57dca40a86a55d215d13d42b", null ],
|
||||
[ "thread_key_delete", "group__thread.html#ga65a50dfc97c087a28cb916e0f30f760e", null ],
|
||||
[ "thread_setspecific", "group__thread.html#ga3008b033f2830e79179a882a2b74c8ba", null ],
|
||||
[ "thread_getspecific", "group__thread.html#ga0d207f1bb2e1d493b68a026b8650cb16", null ],
|
||||
[ "mutexattr_init", "group__thread.html#ga9fb2733a01e8d668a2022005ea5dbebd", null ],
|
||||
[ "mutexattr_destroy", "group__thread.html#ga07bf0e49b1f2cb99d3a2955641c676d5", null ],
|
||||
[ "mutexattr_settype", "group__thread.html#ga601a6a9527d7d5ee2ca2870cddc4afc2", null ],
|
||||
[ "mutexattr_gettype", "group__thread.html#gadf741e1818d53c5b7d71cd68e161b215", null ],
|
||||
[ "condattr_init", "group__thread.html#gab8073c72be896ba9d711d887a5405a74", null ],
|
||||
[ "condattr_destroy", "group__thread.html#ga4644f4989b30ccfb2e908017c43bd0d0", null ],
|
||||
[ "thread_attr_init", "group__thread.html#gaaf2db7012069f0006e7ffaf257d8ccc6", null ],
|
||||
[ "thread_attr_destroy", "group__thread.html#gaf3a9c2c051deee01e21c75f0fa8b2e9c", null ],
|
||||
[ "thread_attr_setdetachstate", "group__thread.html#gabc82fea1785fc82aeb2f43cdd77b9b0f", null ],
|
||||
[ "thread_attr_getdetachstate", "group__thread.html#gaae83c8617612c1bb481fec2b382ac9c4", null ],
|
||||
[ "thread_cancel", "group__thread.html#ga1b3cb53565eabe02a36e000e5244dfd1", null ],
|
||||
[ "thread_setcancelstate", "group__thread.html#ga98baffe08beec792f3428ae9ddad966e", null ],
|
||||
[ "thread_setcanceltype", "group__thread.html#gab4ec114c7b59f8f4185bac648b256d0c", null ],
|
||||
[ "thread_testcancel", "group__thread.html#ga81bdb13d62e16ad7cb3cbd263c9a5671", null ]
|
||||
];
|
|
@ -1,38 +0,0 @@
|
|||
var group__utils =
|
||||
[
|
||||
[ "utils.h", "utils_8h.html", null ],
|
||||
[ "concat_2str", "group__utils.html#ga22347cbf977a0300726f06257edd79d6", null ],
|
||||
[ "concat_3str", "group__utils.html#ga123e40006d54612c48c2660432dfeb23", null ],
|
||||
[ "concat_4str", "group__utils.html#ga69037999e65cdb42d39988e0fec48af4", null ],
|
||||
[ "concat_5str", "group__utils.html#ga580d1897bc7a8cef16d5a16a2373b876", null ],
|
||||
[ "concat_6str", "group__utils.html#ga34f8c2fcee597a99c5f4c66f2119bca9", null ],
|
||||
[ "concat_7str", "group__utils.html#ga01d1ea65eb6780d91705484dd46833bf", null ],
|
||||
[ "int2str", "group__utils.html#ga3c545b669dff7d67e5ed3c58233ccf4b", null ],
|
||||
[ "int2nstr", "group__utils.html#ga858ece77e79fb78d3db0f1851bf7fe09", null ],
|
||||
[ "long2str", "group__utils.html#ga69373a612a7b4d264371f727217f9954", null ],
|
||||
[ "long2nstr", "group__utils.html#ga50cea1f8154c7c7d2abd68f1ddb33086", null ],
|
||||
[ "perc2str", "group__utils.html#ga59cd66180162d107cf86a51c21d7e6f5", null ],
|
||||
[ "length_vargs_string_list", "group__utils.html#ga7bffda236a079c26302722c7d155f7a5", null ],
|
||||
[ "not_null", "group__utils.html#gadfa0375f8178c737deae23ffa8d152f4", null ],
|
||||
[ "mem_alloc", "group__utils.html#gadce4d1c428f979bf1cf8e1582d2f4052", null ],
|
||||
[ "mem_free", "group__utils.html#gabe60e8350f3e3b07ed5002ee3449a6ae", null ],
|
||||
[ "string_clone", "group__utils.html#ga825354891d287cc86d2b4ed1b600175a", null ],
|
||||
[ "string_num_lines", "group__utils.html#ga15630ddb64e977c8243892556feedfd8", null ],
|
||||
[ "string_num_columns", "group__utils.html#ga0ca31b2a579b6ef7c75c41324ed5367c", null ],
|
||||
[ "string_count_char", "group__utils.html#gad643e0fcac9e59c1a171c460633e8637", null ],
|
||||
[ "string_starts_with", "group__utils.html#ga3ec2b60d1636397119c5e0c21987f791", null ],
|
||||
[ "string_ends_with", "group__utils.html#ga1c5ba308f71c323fbbd7eb9bb34285d4", null ],
|
||||
[ "string_concat", "group__utils.html#gaa23a827164f7039b9770379cbf008905", null ],
|
||||
[ "random_boolean", "group__utils.html#gabe3e28fe49daaf3530e203c4aed1d15f", null ],
|
||||
[ "random_int", "group__utils.html#gad7954e6a1b9ea073c7bc894dc5af85a9", null ],
|
||||
[ "random_string", "group__utils.html#gaa820c93c2f719401b4b1ca54f6ea5c75", null ],
|
||||
[ "clear_console", "group__utils.html#ga3cffe15b7e5d10a108f1734a9640a2c7", null ],
|
||||
[ "move_cursor", "group__utils.html#gad3d324aed0ec686314cb0f68dfde9853", null ],
|
||||
[ "hide_cursor", "group__utils.html#ga42702791e6da9510e4f44f33d2dad8f1", null ],
|
||||
[ "show_cursor", "group__utils.html#ga1bdd62a6bef7cfd6522dc1412e162559", null ],
|
||||
[ "string_list_length", "group__utils.html#gab8050db5b87bfdee91ee92e67b063478", null ],
|
||||
[ "string_list_clone", "group__utils.html#ga41163cf3a95e702f12506cd54ba3c70c", null ],
|
||||
[ "string_list_free", "group__utils.html#gaacf77b3345bbca43767b08ec0583fe3c", null ],
|
||||
[ "int2nstring", "group__utils.html#ga824373ca8e0b2fdfe3f5c4805cf2ab7e", null ],
|
||||
[ "percentage2string", "group__utils.html#gacf6edf10cb84412b6bfb431ef87b56d6", null ]
|
||||
];
|
|
@ -1,78 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: Main Page</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('index.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">C++ Library, mos@ua Documentation</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this file.
|
||||
|
||||
Copyright (C) 1997-2017 by Dimitri van Heesch
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This 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 program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this file
|
||||
*/
|
||||
function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
|
||||
function makeTree(data,relPath) {
|
||||
var result='';
|
||||
if ('children' in data) {
|
||||
result+='<ul>';
|
||||
for (var i in data.children) {
|
||||
result+='<li><a href="'+relPath+data.children[i].url+'">'+
|
||||
data.children[i].text+'</a>'+
|
||||
makeTree(data.children[i],relPath)+'</li>';
|
||||
}
|
||||
result+='</ul>';
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
$('#main-nav').append(makeTree(menudata,relPath));
|
||||
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
|
||||
if (searchEnabled) {
|
||||
if (serverSide) {
|
||||
$('#main-menu').append('<li style="float:right"><div id="MSearchBox" class="MSearchBoxInactive"><div class="left"><form id="FSearchBox" action="'+relPath+searchPage+'" method="get"><img id="MSearchSelect" src="'+relPath+'search/mag.png" alt=""/><input type="text" id="MSearchField" name="query" value="'+search+'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)"></form></div><div class="right"></div></div></li>');
|
||||
} else {
|
||||
$('#main-menu').append('<li style="float:right"><div id="MSearchBox" class="MSearchBoxInactive"><span class="left"><img id="MSearchSelect" src="'+relPath+'search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/><input type="text" id="MSearchField" value="'+search+'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/></span><span class="right"><a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="'+relPath+'search/close.png" alt=""/></a></span></div></li>');
|
||||
}
|
||||
}
|
||||
$('#main-menu').smartmenus();
|
||||
}
|
||||
/* @license-end */
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this file.
|
||||
|
||||
Copyright (C) 1997-2019 by Dimitri van Heesch
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of version 2 of the GNU General Public License as published by
|
||||
the Free Software Foundation
|
||||
|
||||
This 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 program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this file
|
||||
*/
|
||||
var menudata={children:[
|
||||
{text:"Main Page",url:"index.html"},
|
||||
{text:"Modules",url:"modules.html"},
|
||||
{text:"Files",url:"files.html",children:[
|
||||
{text:"File List",url:"files.html"},
|
||||
{text:"Globals",url:"globals.html",children:[
|
||||
{text:"All",url:"globals.html",children:[
|
||||
{text:"c",url:"globals.html#index_c"},
|
||||
{text:"e",url:"globals.html#index_e"},
|
||||
{text:"h",url:"globals.html#index_h"},
|
||||
{text:"i",url:"globals.html#index_i"},
|
||||
{text:"l",url:"globals.html#index_l"},
|
||||
{text:"m",url:"globals.html#index_m"},
|
||||
{text:"n",url:"globals.html#index_n"},
|
||||
{text:"p",url:"globals.html#index_p"},
|
||||
{text:"r",url:"globals.html#index_r"},
|
||||
{text:"s",url:"globals.html#index_s"},
|
||||
{text:"t",url:"globals.html#index_t"}]},
|
||||
{text:"Functions",url:"globals_func.html",children:[
|
||||
{text:"c",url:"globals_func.html#index_c"},
|
||||
{text:"h",url:"globals_func.html#index_h"},
|
||||
{text:"i",url:"globals_func.html#index_i"},
|
||||
{text:"m",url:"globals_func.html#index_m"},
|
||||
{text:"p",url:"globals_func.html#index_p"},
|
||||
{text:"r",url:"globals_func.html#index_r"},
|
||||
{text:"s",url:"globals_func.html#index_s"},
|
||||
{text:"t",url:"globals_func.html#index_t"}]},
|
||||
{text:"Macros",url:"globals_defs.html"}]}]}]}
|
|
@ -1,86 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: Modules</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('modules.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Modules</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all modules:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a class="el" href="group___db_c.html" target="_self">DbC</a></td><td class="desc">Design-by-Contract module </td></tr>
|
||||
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a class="el" href="group__process.html" target="_self">process</a></td><td class="desc"><a class="el" href="group__process.html#process">Process</a>, <a class="el" href="group__process.html#sysV">System-V</a>, and <a class="el" href="group__process.html#posix_sem">POSIX libraries</a> wrapper module </td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a class="el" href="group__thread.html" target="_self">thread</a></td><td class="desc">POSIX threads library wrapper module </td></tr>
|
||||
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a class="el" href="group__utils.html" target="_self">utils</a></td><td class="desc">Useful common functions and macros </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||
var modules =
|
||||
[
|
||||
[ "DbC", "group___db_c.html", "group___db_c" ],
|
||||
[ "process", "group__process.html", "group__process" ],
|
||||
[ "thread", "group__thread.html", "group__thread" ],
|
||||
[ "utils", "group__utils.html", "group__utils" ]
|
||||
];
|
Before Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 98 B |
|
@ -1,146 +0,0 @@
|
|||
#nav-tree .children_ul {
|
||||
margin:0;
|
||||
padding:4px;
|
||||
}
|
||||
|
||||
#nav-tree ul {
|
||||
list-style:none outside none;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree li {
|
||||
white-space:nowrap;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree .plus {
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
#nav-tree .selected {
|
||||
background-image: url('tab_a.png');
|
||||
background-repeat:repeat-x;
|
||||
color: #fff;
|
||||
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||
}
|
||||
|
||||
#nav-tree img {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
border:0px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#nav-tree a {
|
||||
text-decoration:none;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
#nav-tree .label {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
|
||||
}
|
||||
|
||||
#nav-tree .label a {
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
#nav-tree .selected a {
|
||||
text-decoration:none;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
#nav-tree .children_ul {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree .item {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree {
|
||||
padding: 0px 0px;
|
||||
background-color: #FAFAFF;
|
||||
font-size:14px;
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
#doc-content {
|
||||
overflow:auto;
|
||||
display:block;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
-webkit-overflow-scrolling : touch; /* iOS 5+ */
|
||||
}
|
||||
|
||||
#side-nav {
|
||||
padding:0 6px 0 0;
|
||||
margin: 0px;
|
||||
display:block;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.ui-resizable .ui-resizable-handle {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.ui-resizable-e {
|
||||
background-image:url("splitbar.png");
|
||||
background-size:100%;
|
||||
background-repeat:repeat-y;
|
||||
background-attachment: scroll;
|
||||
cursor:ew-resize;
|
||||
height:100%;
|
||||
right:0;
|
||||
top:0;
|
||||
width:6px;
|
||||
}
|
||||
|
||||
.ui-resizable-handle {
|
||||
display:none;
|
||||
font-size:0.1px;
|
||||
position:absolute;
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
#nav-tree-contents {
|
||||
margin: 6px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#nav-tree {
|
||||
background-image:url('nav_h.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #F9FAFC;
|
||||
-webkit-overflow-scrolling : touch; /* iOS 5+ */
|
||||
}
|
||||
|
||||
#nav-sync {
|
||||
position:absolute;
|
||||
top:5px;
|
||||
right:24px;
|
||||
z-index:0;
|
||||
}
|
||||
|
||||
#nav-sync img {
|
||||
opacity:0.3;
|
||||
}
|
||||
|
||||
#nav-sync img:hover {
|
||||
opacity:0.9;
|
||||
}
|
||||
|
||||
@media print
|
||||
{
|
||||
#nav-tree { display: none; }
|
||||
div.ui-resizable-handle { display: none; position: relative; }
|
||||
}
|
||||
|
|
@ -1,544 +0,0 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this file.
|
||||
|
||||
Copyright (C) 1997-2019 by Dimitri van Heesch
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of version 2 of the GNU General Public License as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This 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 program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this file
|
||||
*/
|
||||
var navTreeSubIndices = new Array();
|
||||
var arrowDown = '▼';
|
||||
var arrowRight = '►';
|
||||
|
||||
function getData(varName)
|
||||
{
|
||||
var i = varName.lastIndexOf('/');
|
||||
var n = i>=0 ? varName.substring(i+1) : varName;
|
||||
return eval(n.replace(/\-/g,'_'));
|
||||
}
|
||||
|
||||
function stripPath(uri)
|
||||
{
|
||||
return uri.substring(uri.lastIndexOf('/')+1);
|
||||
}
|
||||
|
||||
function stripPath2(uri)
|
||||
{
|
||||
var i = uri.lastIndexOf('/');
|
||||
var s = uri.substring(i+1);
|
||||
var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
|
||||
return m ? uri.substring(i-6) : s;
|
||||
}
|
||||
|
||||
function hashValue()
|
||||
{
|
||||
return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,'');
|
||||
}
|
||||
|
||||
function hashUrl()
|
||||
{
|
||||
return '#'+hashValue();
|
||||
}
|
||||
|
||||
function pathName()
|
||||
{
|
||||
return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, '');
|
||||
}
|
||||
|
||||
function localStorageSupported()
|
||||
{
|
||||
try {
|
||||
return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
|
||||
}
|
||||
catch(e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function storeLink(link)
|
||||
{
|
||||
if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
|
||||
window.localStorage.setItem('navpath',link);
|
||||
}
|
||||
}
|
||||
|
||||
function deleteLink()
|
||||
{
|
||||
if (localStorageSupported()) {
|
||||
window.localStorage.setItem('navpath','');
|
||||
}
|
||||
}
|
||||
|
||||
function cachedLink()
|
||||
{
|
||||
if (localStorageSupported()) {
|
||||
return window.localStorage.getItem('navpath');
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function getScript(scriptName,func,show)
|
||||
{
|
||||
var head = document.getElementsByTagName("head")[0];
|
||||
var script = document.createElement('script');
|
||||
script.id = scriptName;
|
||||
script.type = 'text/javascript';
|
||||
script.onload = func;
|
||||
script.src = scriptName+'.js';
|
||||
head.appendChild(script);
|
||||
}
|
||||
|
||||
function createIndent(o,domNode,node,level)
|
||||
{
|
||||
var level=-1;
|
||||
var n = node;
|
||||
while (n.parentNode) { level++; n=n.parentNode; }
|
||||
if (node.childrenData) {
|
||||
var imgNode = document.createElement("span");
|
||||
imgNode.className = 'arrow';
|
||||
imgNode.style.paddingLeft=(16*level).toString()+'px';
|
||||
imgNode.innerHTML=arrowRight;
|
||||
node.plus_img = imgNode;
|
||||
node.expandToggle = document.createElement("a");
|
||||
node.expandToggle.href = "javascript:void(0)";
|
||||
node.expandToggle.onclick = function() {
|
||||
if (node.expanded) {
|
||||
$(node.getChildrenUL()).slideUp("fast");
|
||||
node.plus_img.innerHTML=arrowRight;
|
||||
node.expanded = false;
|
||||
} else {
|
||||
expandNode(o, node, false, false);
|
||||
}
|
||||
}
|
||||
node.expandToggle.appendChild(imgNode);
|
||||
domNode.appendChild(node.expandToggle);
|
||||
} else {
|
||||
var span = document.createElement("span");
|
||||
span.className = 'arrow';
|
||||
span.style.width = 16*(level+1)+'px';
|
||||
span.innerHTML = ' ';
|
||||
domNode.appendChild(span);
|
||||
}
|
||||
}
|
||||
|
||||
var animationInProgress = false;
|
||||
|
||||
function gotoAnchor(anchor,aname,updateLocation)
|
||||
{
|
||||
var pos, docContent = $('#doc-content');
|
||||
var ancParent = $(anchor.parent());
|
||||
if (ancParent.hasClass('memItemLeft') ||
|
||||
ancParent.hasClass('memtitle') ||
|
||||
ancParent.hasClass('fieldname') ||
|
||||
ancParent.hasClass('fieldtype') ||
|
||||
ancParent.is(':header'))
|
||||
{
|
||||
pos = ancParent.position().top;
|
||||
} else if (anchor.position()) {
|
||||
pos = anchor.position().top;
|
||||
}
|
||||
if (pos) {
|
||||
var dist = Math.abs(Math.min(
|
||||
pos-docContent.offset().top,
|
||||
docContent[0].scrollHeight-
|
||||
docContent.height()-docContent.scrollTop()));
|
||||
animationInProgress=true;
|
||||
docContent.animate({
|
||||
scrollTop: pos + docContent.scrollTop() - docContent.offset().top
|
||||
},Math.max(50,Math.min(500,dist)),function(){
|
||||
if (updateLocation) window.location.href=aname;
|
||||
animationInProgress=false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function newNode(o, po, text, link, childrenData, lastNode)
|
||||
{
|
||||
var node = new Object();
|
||||
node.children = Array();
|
||||
node.childrenData = childrenData;
|
||||
node.depth = po.depth + 1;
|
||||
node.relpath = po.relpath;
|
||||
node.isLast = lastNode;
|
||||
|
||||
node.li = document.createElement("li");
|
||||
po.getChildrenUL().appendChild(node.li);
|
||||
node.parentNode = po;
|
||||
|
||||
node.itemDiv = document.createElement("div");
|
||||
node.itemDiv.className = "item";
|
||||
|
||||
node.labelSpan = document.createElement("span");
|
||||
node.labelSpan.className = "label";
|
||||
|
||||
createIndent(o,node.itemDiv,node,0);
|
||||
node.itemDiv.appendChild(node.labelSpan);
|
||||
node.li.appendChild(node.itemDiv);
|
||||
|
||||
var a = document.createElement("a");
|
||||
node.labelSpan.appendChild(a);
|
||||
node.label = document.createTextNode(text);
|
||||
node.expanded = false;
|
||||
a.appendChild(node.label);
|
||||
if (link) {
|
||||
var url;
|
||||
if (link.substring(0,1)=='^') {
|
||||
url = link.substring(1);
|
||||
link = url;
|
||||
} else {
|
||||
url = node.relpath+link;
|
||||
}
|
||||
a.className = stripPath(link.replace('#',':'));
|
||||
if (link.indexOf('#')!=-1) {
|
||||
var aname = '#'+link.split('#')[1];
|
||||
var srcPage = stripPath(pathName());
|
||||
var targetPage = stripPath(link.split('#')[0]);
|
||||
a.href = srcPage!=targetPage ? url : "javascript:void(0)";
|
||||
a.onclick = function(){
|
||||
storeLink(link);
|
||||
if (!$(a).parent().parent().hasClass('selected'))
|
||||
{
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
$(a).parent().parent().addClass('selected');
|
||||
$(a).parent().parent().attr('id','selected');
|
||||
}
|
||||
var anchor = $(aname);
|
||||
gotoAnchor(anchor,aname,true);
|
||||
};
|
||||
} else {
|
||||
a.href = url;
|
||||
a.onclick = function() { storeLink(link); }
|
||||
}
|
||||
} else {
|
||||
if (childrenData != null)
|
||||
{
|
||||
a.className = "nolink";
|
||||
a.href = "javascript:void(0)";
|
||||
a.onclick = node.expandToggle.onclick;
|
||||
}
|
||||
}
|
||||
|
||||
node.childrenUL = null;
|
||||
node.getChildrenUL = function() {
|
||||
if (!node.childrenUL) {
|
||||
node.childrenUL = document.createElement("ul");
|
||||
node.childrenUL.className = "children_ul";
|
||||
node.childrenUL.style.display = "none";
|
||||
node.li.appendChild(node.childrenUL);
|
||||
}
|
||||
return node.childrenUL;
|
||||
};
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
function showRoot()
|
||||
{
|
||||
var headerHeight = $("#top").height();
|
||||
var footerHeight = $("#nav-path").height();
|
||||
var windowHeight = $(window).height() - headerHeight - footerHeight;
|
||||
(function (){ // retry until we can scroll to the selected item
|
||||
try {
|
||||
var navtree=$('#nav-tree');
|
||||
navtree.scrollTo('#selected',100,{offset:-windowHeight/2});
|
||||
} catch (err) {
|
||||
setTimeout(arguments.callee, 0);
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
function expandNode(o, node, imm, showRoot)
|
||||
{
|
||||
if (node.childrenData && !node.expanded) {
|
||||
if (typeof(node.childrenData)==='string') {
|
||||
var varName = node.childrenData;
|
||||
getScript(node.relpath+varName,function(){
|
||||
node.childrenData = getData(varName);
|
||||
expandNode(o, node, imm, showRoot);
|
||||
}, showRoot);
|
||||
} else {
|
||||
if (!node.childrenVisited) {
|
||||
getNode(o, node);
|
||||
}
|
||||
$(node.getChildrenUL()).slideDown("fast");
|
||||
node.plus_img.innerHTML = arrowDown;
|
||||
node.expanded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function glowEffect(n,duration)
|
||||
{
|
||||
n.addClass('glow').delay(duration).queue(function(next){
|
||||
$(this).removeClass('glow');next();
|
||||
});
|
||||
}
|
||||
|
||||
function highlightAnchor()
|
||||
{
|
||||
var aname = hashUrl();
|
||||
var anchor = $(aname);
|
||||
if (anchor.parent().attr('class')=='memItemLeft'){
|
||||
var rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
|
||||
glowEffect(rows.children(),300); // member without details
|
||||
} else if (anchor.parent().attr('class')=='fieldname'){
|
||||
glowEffect(anchor.parent().parent(),1000); // enum value
|
||||
} else if (anchor.parent().attr('class')=='fieldtype'){
|
||||
glowEffect(anchor.parent().parent(),1000); // struct field
|
||||
} else if (anchor.parent().is(":header")) {
|
||||
glowEffect(anchor.parent(),1000); // section header
|
||||
} else {
|
||||
glowEffect(anchor.next(),1000); // normal member
|
||||
}
|
||||
}
|
||||
|
||||
function selectAndHighlight(hash,n)
|
||||
{
|
||||
var a;
|
||||
if (hash) {
|
||||
var link=stripPath(pathName())+':'+hash.substring(1);
|
||||
a=$('.item a[class$="'+link+'"]');
|
||||
}
|
||||
if (a && a.length) {
|
||||
a.parent().parent().addClass('selected');
|
||||
a.parent().parent().attr('id','selected');
|
||||
highlightAnchor();
|
||||
} else if (n) {
|
||||
$(n.itemDiv).addClass('selected');
|
||||
$(n.itemDiv).attr('id','selected');
|
||||
}
|
||||
if ($('#nav-tree-contents .item:first').hasClass('selected')) {
|
||||
$('#nav-sync').css('top','30px');
|
||||
} else {
|
||||
$('#nav-sync').css('top','5px');
|
||||
}
|
||||
showRoot();
|
||||
}
|
||||
|
||||
function showNode(o, node, index, hash)
|
||||
{
|
||||
if (node && node.childrenData) {
|
||||
if (typeof(node.childrenData)==='string') {
|
||||
var varName = node.childrenData;
|
||||
getScript(node.relpath+varName,function(){
|
||||
node.childrenData = getData(varName);
|
||||
showNode(o,node,index,hash);
|
||||
},true);
|
||||
} else {
|
||||
if (!node.childrenVisited) {
|
||||
getNode(o, node);
|
||||
}
|
||||
$(node.getChildrenUL()).css({'display':'block'});
|
||||
node.plus_img.innerHTML = arrowDown;
|
||||
node.expanded = true;
|
||||
var n = node.children[o.breadcrumbs[index]];
|
||||
if (index+1<o.breadcrumbs.length) {
|
||||
showNode(o,n,index+1,hash);
|
||||
} else {
|
||||
if (typeof(n.childrenData)==='string') {
|
||||
var varName = n.childrenData;
|
||||
getScript(n.relpath+varName,function(){
|
||||
n.childrenData = getData(varName);
|
||||
node.expanded=false;
|
||||
showNode(o,node,index,hash); // retry with child node expanded
|
||||
},true);
|
||||
} else {
|
||||
var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
|
||||
if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
|
||||
expandNode(o, n, true, true);
|
||||
}
|
||||
selectAndHighlight(hash,n);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selectAndHighlight(hash);
|
||||
}
|
||||
}
|
||||
|
||||
function removeToInsertLater(element) {
|
||||
var parentNode = element.parentNode;
|
||||
var nextSibling = element.nextSibling;
|
||||
parentNode.removeChild(element);
|
||||
return function() {
|
||||
if (nextSibling) {
|
||||
parentNode.insertBefore(element, nextSibling);
|
||||
} else {
|
||||
parentNode.appendChild(element);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function getNode(o, po)
|
||||
{
|
||||
var insertFunction = removeToInsertLater(po.li);
|
||||
po.childrenVisited = true;
|
||||
var l = po.childrenData.length-1;
|
||||
for (var i in po.childrenData) {
|
||||
var nodeData = po.childrenData[i];
|
||||
po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
|
||||
i==l);
|
||||
}
|
||||
insertFunction();
|
||||
}
|
||||
|
||||
function gotoNode(o,subIndex,root,hash,relpath)
|
||||
{
|
||||
var nti = navTreeSubIndices[subIndex][root+hash];
|
||||
o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
|
||||
if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
|
||||
navTo(o,NAVTREE[0][1],"",relpath);
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
}
|
||||
if (o.breadcrumbs) {
|
||||
o.breadcrumbs.unshift(0); // add 0 for root node
|
||||
showNode(o, o.node, 0, hash);
|
||||
}
|
||||
}
|
||||
|
||||
function navTo(o,root,hash,relpath)
|
||||
{
|
||||
var link = cachedLink();
|
||||
if (link) {
|
||||
var parts = link.split('#');
|
||||
root = parts[0];
|
||||
if (parts.length>1) hash = '#'+parts[1].replace(/[^\w\-]/g,'');
|
||||
else hash='';
|
||||
}
|
||||
if (hash.match(/^#l\d+$/)) {
|
||||
var anchor=$('a[name='+hash.substring(1)+']');
|
||||
glowEffect(anchor.parent(),1000); // line number
|
||||
hash=''; // strip line number anchors
|
||||
}
|
||||
var url=root+hash;
|
||||
var i=-1;
|
||||
while (NAVTREEINDEX[i+1]<=url) i++;
|
||||
if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
|
||||
if (navTreeSubIndices[i]) {
|
||||
gotoNode(o,i,root,hash,relpath)
|
||||
} else {
|
||||
getScript(relpath+'navtreeindex'+i,function(){
|
||||
navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
|
||||
if (navTreeSubIndices[i]) {
|
||||
gotoNode(o,i,root,hash,relpath);
|
||||
}
|
||||
},true);
|
||||
}
|
||||
}
|
||||
|
||||
function showSyncOff(n,relpath)
|
||||
{
|
||||
n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
|
||||
}
|
||||
|
||||
function showSyncOn(n,relpath)
|
||||
{
|
||||
n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
|
||||
}
|
||||
|
||||
function toggleSyncButton(relpath)
|
||||
{
|
||||
var navSync = $('#nav-sync');
|
||||
if (navSync.hasClass('sync')) {
|
||||
navSync.removeClass('sync');
|
||||
showSyncOff(navSync,relpath);
|
||||
storeLink(stripPath2(pathName())+hashUrl());
|
||||
} else {
|
||||
navSync.addClass('sync');
|
||||
showSyncOn(navSync,relpath);
|
||||
deleteLink();
|
||||
}
|
||||
}
|
||||
|
||||
var loadTriggered = false;
|
||||
var readyTriggered = false;
|
||||
var loadObject,loadToRoot,loadUrl,loadRelPath;
|
||||
|
||||
$(window).on('load',function(){
|
||||
if (readyTriggered) { // ready first
|
||||
navTo(loadObject,loadToRoot,loadUrl,loadRelPath);
|
||||
showRoot();
|
||||
}
|
||||
loadTriggered=true;
|
||||
});
|
||||
|
||||
function initNavTree(toroot,relpath)
|
||||
{
|
||||
var o = new Object();
|
||||
o.toroot = toroot;
|
||||
o.node = new Object();
|
||||
o.node.li = document.getElementById("nav-tree-contents");
|
||||
o.node.childrenData = NAVTREE;
|
||||
o.node.children = new Array();
|
||||
o.node.childrenUL = document.createElement("ul");
|
||||
o.node.getChildrenUL = function() { return o.node.childrenUL; };
|
||||
o.node.li.appendChild(o.node.childrenUL);
|
||||
o.node.depth = 0;
|
||||
o.node.relpath = relpath;
|
||||
o.node.expanded = false;
|
||||
o.node.isLast = true;
|
||||
o.node.plus_img = document.createElement("span");
|
||||
o.node.plus_img.className = 'arrow';
|
||||
o.node.plus_img.innerHTML = arrowRight;
|
||||
|
||||
if (localStorageSupported()) {
|
||||
var navSync = $('#nav-sync');
|
||||
if (cachedLink()) {
|
||||
showSyncOff(navSync,relpath);
|
||||
navSync.removeClass('sync');
|
||||
} else {
|
||||
showSyncOn(navSync,relpath);
|
||||
}
|
||||
navSync.click(function(){ toggleSyncButton(relpath); });
|
||||
}
|
||||
|
||||
if (loadTriggered) { // load before ready
|
||||
navTo(o,toroot,hashUrl(),relpath);
|
||||
showRoot();
|
||||
} else { // ready before load
|
||||
loadObject = o;
|
||||
loadToRoot = toroot;
|
||||
loadUrl = hashUrl();
|
||||
loadRelPath = relpath;
|
||||
readyTriggered=true;
|
||||
}
|
||||
|
||||
$(window).bind('hashchange', function(){
|
||||
if (window.location.hash && window.location.hash.length>1){
|
||||
var a;
|
||||
if ($(location).attr('hash')){
|
||||
var clslink=stripPath(pathName())+':'+hashValue();
|
||||
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
|
||||
}
|
||||
if (a==null || !$(a).parent().parent().hasClass('selected')){
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
}
|
||||
var link=stripPath2(pathName());
|
||||
navTo(o,link,hashUrl(),relpath);
|
||||
} else if (!animationInProgress) {
|
||||
$('#doc-content').scrollTop(0);
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
navTo(o,toroot,hashUrl(),relpath);
|
||||
}
|
||||
})
|
||||
}
|
||||
/* @license-end */
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this file.
|
||||
|
||||
Copyright (C) 1997-2019 by Dimitri van Heesch
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of version 2 of the GNU General Public License as published by
|
||||
the Free Software Foundation
|
||||
|
||||
This 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 program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this file
|
||||
*/
|
||||
var NAVTREE =
|
||||
[
|
||||
[ "C++ Library, mos@ua", "index.html", [
|
||||
[ "Modules", "modules.html", "modules" ],
|
||||
[ "Files", "files.html", [
|
||||
[ "File List", "files.html", "files_dup" ],
|
||||
[ "Globals", "globals.html", [
|
||||
[ "All", "globals.html", null ],
|
||||
[ "Functions", "globals_func.html", null ],
|
||||
[ "Macros", "globals_defs.html", null ]
|
||||
] ]
|
||||
] ]
|
||||
] ]
|
||||
];
|
||||
|
||||
var NAVTREEINDEX =
|
||||
[
|
||||
"dbc_8h.html"
|
||||
];
|
||||
|
||||
var SYNCONMSG = 'click to disable panel synchronisation';
|
||||
var SYNCOFFMSG = 'click to enable panel synchronisation';
|
|
@ -1,238 +0,0 @@
|
|||
var NAVTREEINDEX0 =
|
||||
{
|
||||
"dbc_8h.html":[1,0,0],
|
||||
"dbc_8h_source.html":[1,0,0],
|
||||
"files.html":[1,0],
|
||||
"globals.html":[1,1,0],
|
||||
"globals_defs.html":[1,1,2],
|
||||
"globals_func.html":[1,1,1],
|
||||
"group___db_c.html":[0,0],
|
||||
"group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8":[0,0,2],
|
||||
"group___db_c.html#ga5bf1825f80465097d4b753a001cf1af8":[1,0,0,1],
|
||||
"group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf":[0,0,3],
|
||||
"group___db_c.html#ga5d17c602c4f191371a5fec5af7adc3cf":[1,0,0,2],
|
||||
"group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221":[0,0,1],
|
||||
"group___db_c.html#gac101c8ba449f6f8c71b3789a9c489221":[1,0,0,0],
|
||||
"group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725":[0,0,4],
|
||||
"group___db_c.html#gaf9d59b04beef1bf139e10fc44c6f9725":[1,0,0,3],
|
||||
"group__process.html":[0,1],
|
||||
"group__process.html#ga013466fa89ac97a0db0ccd78168a8456":[0,1,30],
|
||||
"group__process.html#ga013466fa89ac97a0db0ccd78168a8456":[1,0,1,29],
|
||||
"group__process.html#ga0415c9c4fab4baafef6cd2d40becd05e":[0,1,23],
|
||||
"group__process.html#ga0415c9c4fab4baafef6cd2d40becd05e":[1,0,1,22],
|
||||
"group__process.html#ga04cb3c84545fe7707c63578e1d59b689":[0,1,27],
|
||||
"group__process.html#ga04cb3c84545fe7707c63578e1d59b689":[1,0,1,26],
|
||||
"group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480":[1,0,1,8],
|
||||
"group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480":[0,1,9],
|
||||
"group__process.html#ga0e2534c82b54573590d913c297cc4840":[1,0,1,12],
|
||||
"group__process.html#ga0e2534c82b54573590d913c297cc4840":[0,1,13],
|
||||
"group__process.html#ga13bfac41329ec74b2aa4950f9586ae9f":[1,0,1,17],
|
||||
"group__process.html#ga13bfac41329ec74b2aa4950f9586ae9f":[0,1,18],
|
||||
"group__process.html#ga1490f6e0ca0ebf607d1f5ff431c79b68":[1,0,1,31],
|
||||
"group__process.html#ga1490f6e0ca0ebf607d1f5ff431c79b68":[0,1,32],
|
||||
"group__process.html#ga1682328cd34b592404ff030779b0428f":[1,0,1,9],
|
||||
"group__process.html#ga1682328cd34b592404ff030779b0428f":[0,1,10],
|
||||
"group__process.html#ga2d9df322812707050312aa24d15a4360":[1,0,1,30],
|
||||
"group__process.html#ga2d9df322812707050312aa24d15a4360":[0,1,31],
|
||||
"group__process.html#ga3119bdf5486059aee6ec3ed65a01b319":[1,0,1,7],
|
||||
"group__process.html#ga3119bdf5486059aee6ec3ed65a01b319":[0,1,8],
|
||||
"group__process.html#ga41a884c3a9d9ac6a31fc6ab27ae1d668":[1,0,1,21],
|
||||
"group__process.html#ga41a884c3a9d9ac6a31fc6ab27ae1d668":[0,1,22],
|
||||
"group__process.html#ga47891b55ba91af98c5b45cbcf154bc20":[1,0,1,15],
|
||||
"group__process.html#ga47891b55ba91af98c5b45cbcf154bc20":[0,1,16],
|
||||
"group__process.html#ga67e00aff1839b1ba68c83947593f625b":[0,1,1],
|
||||
"group__process.html#ga67e00aff1839b1ba68c83947593f625b":[1,0,1,0],
|
||||
"group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba":[1,0,1,20],
|
||||
"group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba":[0,1,21],
|
||||
"group__process.html#ga7c7f6de68bd3dea8a702668090a65854":[1,0,1,5],
|
||||
"group__process.html#ga7c7f6de68bd3dea8a702668090a65854":[0,1,6],
|
||||
"group__process.html#ga82e3d1015521711a2a6374d6c3771491":[0,1,25],
|
||||
"group__process.html#ga82e3d1015521711a2a6374d6c3771491":[1,0,1,24],
|
||||
"group__process.html#gaa00610fec639ef123819ceee2ef00da3":[1,0,1,13],
|
||||
"group__process.html#gaa00610fec639ef123819ceee2ef00da3":[0,1,14],
|
||||
"group__process.html#gaada159a0fe725ed843ac358be6e6a9d3":[1,0,1,10],
|
||||
"group__process.html#gaada159a0fe725ed843ac358be6e6a9d3":[0,1,11],
|
||||
"group__process.html#gab546ccee89e3159ea7c23aa3a463a0d8":[1,0,1,3],
|
||||
"group__process.html#gab546ccee89e3159ea7c23aa3a463a0d8":[0,1,4],
|
||||
"group__process.html#gac2b930e9aceda9ef276b21ae8e839c16":[1,0,1,14],
|
||||
"group__process.html#gac2b930e9aceda9ef276b21ae8e839c16":[0,1,15],
|
||||
"group__process.html#gac42e869afba098ec9bdd77444ba790c5":[1,0,1,11],
|
||||
"group__process.html#gac42e869afba098ec9bdd77444ba790c5":[0,1,12],
|
||||
"group__process.html#gac49ddb266cec5493ebd756cd9382f99d":[0,1,24],
|
||||
"group__process.html#gac49ddb266cec5493ebd756cd9382f99d":[1,0,1,23],
|
||||
"group__process.html#gac8b2b3d1e18b385f10b389ce2ea734ef":[0,1,28],
|
||||
"group__process.html#gac8b2b3d1e18b385f10b389ce2ea734ef":[1,0,1,27],
|
||||
"group__process.html#gac926bd7ccd173f742b5d58f51cabcb48":[0,1,3],
|
||||
"group__process.html#gac926bd7ccd173f742b5d58f51cabcb48":[1,0,1,2],
|
||||
"group__process.html#gacd4e4161a46bfa2e1f23eb1d49aaa07b":[1,0,1,19],
|
||||
"group__process.html#gacd4e4161a46bfa2e1f23eb1d49aaa07b":[0,1,20],
|
||||
"group__process.html#gad27b81fee9a0f792c4ba29fd95c967e1":[0,1,2],
|
||||
"group__process.html#gad27b81fee9a0f792c4ba29fd95c967e1":[1,0,1,1],
|
||||
"group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7":[1,0,1,16],
|
||||
"group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7":[0,1,17],
|
||||
"group__process.html#gad63921c4ec6f0845b752eb59a8935b8e":[0,1,29],
|
||||
"group__process.html#gad63921c4ec6f0845b752eb59a8935b8e":[1,0,1,28],
|
||||
"group__process.html#gae2c867f9f66e74fad44df3f32f87a8c6":[0,1,26],
|
||||
"group__process.html#gae2c867f9f66e74fad44df3f32f87a8c6":[1,0,1,25],
|
||||
"group__process.html#gae5d3e8ac00f0e788f21020699bac758a":[1,0,1,4],
|
||||
"group__process.html#gae5d3e8ac00f0e788f21020699bac758a":[0,1,5],
|
||||
"group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a":[1,0,1,18],
|
||||
"group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a":[0,1,19],
|
||||
"group__process.html#gaff71624be0fc9c76e0c72295721875e6":[1,0,1,6],
|
||||
"group__process.html#gaff71624be0fc9c76e0c72295721875e6":[0,1,7],
|
||||
"group__thread.html":[0,2],
|
||||
"group__thread.html#ga07bf0e49b1f2cb99d3a2955641c676d5":[0,2,26],
|
||||
"group__thread.html#ga07bf0e49b1f2cb99d3a2955641c676d5":[1,0,2,25],
|
||||
"group__thread.html#ga0d207f1bb2e1d493b68a026b8650cb16":[0,2,24],
|
||||
"group__thread.html#ga0d207f1bb2e1d493b68a026b8650cb16":[1,0,2,23],
|
||||
"group__thread.html#ga1123643838d5174ccd41f52f4169e896":[1,0,2,14],
|
||||
"group__thread.html#ga1123643838d5174ccd41f52f4169e896":[0,2,15],
|
||||
"group__thread.html#ga19b16adf05364471bae2840aa564329a":[1,0,2,4],
|
||||
"group__thread.html#ga19b16adf05364471bae2840aa564329a":[0,2,5],
|
||||
"group__thread.html#ga1b3cb53565eabe02a36e000e5244dfd1":[0,2,35],
|
||||
"group__thread.html#ga1b3cb53565eabe02a36e000e5244dfd1":[1,0,2,34],
|
||||
"group__thread.html#ga2b2370a45c1518f777493526b2e4f46d":[1,0,2,6],
|
||||
"group__thread.html#ga2b2370a45c1518f777493526b2e4f46d":[0,2,7],
|
||||
"group__thread.html#ga3008b033f2830e79179a882a2b74c8ba":[0,2,23],
|
||||
"group__thread.html#ga3008b033f2830e79179a882a2b74c8ba":[1,0,2,22],
|
||||
"group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad":[1,0,2,12],
|
||||
"group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad":[0,2,13],
|
||||
"group__thread.html#ga3a0f9920a321b54c41c098d3461d3889":[1,0,2,1],
|
||||
"group__thread.html#ga3a0f9920a321b54c41c098d3461d3889":[0,2,2],
|
||||
"group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6":[1,0,2,7],
|
||||
"group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6":[0,2,8],
|
||||
"group__thread.html#ga4644f4989b30ccfb2e908017c43bd0d0":[0,2,30],
|
||||
"group__thread.html#ga4644f4989b30ccfb2e908017c43bd0d0":[1,0,2,29],
|
||||
"group__thread.html#ga4b41089ba3cd8ad0a539b42bc8b95d6b":[1,0,2,16],
|
||||
"group__thread.html#ga4b41089ba3cd8ad0a539b42bc8b95d6b":[0,2,17],
|
||||
"group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01":[0,2,9],
|
||||
"group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01":[1,0,2,8],
|
||||
"group__thread.html#ga601a6a9527d7d5ee2ca2870cddc4afc2":[0,2,27],
|
||||
"group__thread.html#ga601a6a9527d7d5ee2ca2870cddc4afc2":[1,0,2,26],
|
||||
"group__thread.html#ga606fdef53f997c231e0e1e9e54b350d4":[1,0,2,2],
|
||||
"group__thread.html#ga606fdef53f997c231e0e1e9e54b350d4":[0,2,3],
|
||||
"group__thread.html#ga6459039ab27da7237dda2bbc866eb2d0":[1,0,2,18],
|
||||
"group__thread.html#ga6459039ab27da7237dda2bbc866eb2d0":[0,2,19],
|
||||
"group__thread.html#ga65a50dfc97c087a28cb916e0f30f760e":[0,2,22],
|
||||
"group__thread.html#ga65a50dfc97c087a28cb916e0f30f760e":[1,0,2,21],
|
||||
"group__thread.html#ga7df1983f57dca40a86a55d215d13d42b":[1,0,2,20],
|
||||
"group__thread.html#ga7df1983f57dca40a86a55d215d13d42b":[0,2,21],
|
||||
"group__thread.html#ga81bdb13d62e16ad7cb3cbd263c9a5671":[1,0,2,37],
|
||||
"group__thread.html#ga81bdb13d62e16ad7cb3cbd263c9a5671":[0,2,38],
|
||||
"group__thread.html#ga86aa7989874009c886bea9d41700e25c":[1,0,2,5],
|
||||
"group__thread.html#ga86aa7989874009c886bea9d41700e25c":[0,2,6],
|
||||
"group__thread.html#ga87086ba0f13f6ddc479a6bc803a10c39":[1,0,2,9],
|
||||
"group__thread.html#ga87086ba0f13f6ddc479a6bc803a10c39":[0,2,10],
|
||||
"group__thread.html#ga8bd074884e1c92e88ca8ea0552d9a928":[1,0,2,10],
|
||||
"group__thread.html#ga8bd074884e1c92e88ca8ea0552d9a928":[0,2,11],
|
||||
"group__thread.html#ga8cd2040836c30e4f0ea17abe4f66b8e2":[1,0,2,15],
|
||||
"group__thread.html#ga8cd2040836c30e4f0ea17abe4f66b8e2":[0,2,16],
|
||||
"group__thread.html#ga95235231165ebda870afa10ba5fd6c41":[1,0,2,11],
|
||||
"group__thread.html#ga95235231165ebda870afa10ba5fd6c41":[0,2,12],
|
||||
"group__thread.html#ga952c63101c667d247f0923b609710c72":[1,0,2,3],
|
||||
"group__thread.html#ga952c63101c667d247f0923b609710c72":[0,2,4],
|
||||
"group__thread.html#ga9624688b577fb653af7a528848cc53d5":[1,0,2,17],
|
||||
"group__thread.html#ga9624688b577fb653af7a528848cc53d5":[0,2,18],
|
||||
"group__thread.html#ga98baffe08beec792f3428ae9ddad966e":[0,2,36],
|
||||
"group__thread.html#ga98baffe08beec792f3428ae9ddad966e":[1,0,2,35],
|
||||
"group__thread.html#ga9fb2733a01e8d668a2022005ea5dbebd":[0,2,25],
|
||||
"group__thread.html#ga9fb2733a01e8d668a2022005ea5dbebd":[1,0,2,24],
|
||||
"group__thread.html#gaae83c8617612c1bb481fec2b382ac9c4":[0,2,34],
|
||||
"group__thread.html#gaae83c8617612c1bb481fec2b382ac9c4":[1,0,2,33],
|
||||
"group__thread.html#gaaf2db7012069f0006e7ffaf257d8ccc6":[1,0,2,30],
|
||||
"group__thread.html#gaaf2db7012069f0006e7ffaf257d8ccc6":[0,2,31],
|
||||
"group__thread.html#gab4ec114c7b59f8f4185bac648b256d0c":[0,2,37],
|
||||
"group__thread.html#gab4ec114c7b59f8f4185bac648b256d0c":[1,0,2,36],
|
||||
"group__thread.html#gab8073c72be896ba9d711d887a5405a74":[0,2,29],
|
||||
"group__thread.html#gab8073c72be896ba9d711d887a5405a74":[1,0,2,28],
|
||||
"group__thread.html#gabc82fea1785fc82aeb2f43cdd77b9b0f":[0,2,33],
|
||||
"group__thread.html#gabc82fea1785fc82aeb2f43cdd77b9b0f":[1,0,2,32],
|
||||
"group__thread.html#gad0428e8a0809704f4b3d682f26d3ef1c":[1,0,2,19],
|
||||
"group__thread.html#gad0428e8a0809704f4b3d682f26d3ef1c":[0,2,20],
|
||||
"group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80":[1,0,2,13],
|
||||
"group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80":[0,2,14],
|
||||
"group__thread.html#gadca8bdcec91b8985370d904591d342b8":[1,0,2,0],
|
||||
"group__thread.html#gadca8bdcec91b8985370d904591d342b8":[0,2,1],
|
||||
"group__thread.html#gadf741e1818d53c5b7d71cd68e161b215":[1,0,2,27],
|
||||
"group__thread.html#gadf741e1818d53c5b7d71cd68e161b215":[0,2,28],
|
||||
"group__thread.html#gaf3a9c2c051deee01e21c75f0fa8b2e9c":[0,2,32],
|
||||
"group__thread.html#gaf3a9c2c051deee01e21c75f0fa8b2e9c":[1,0,2,31],
|
||||
"group__utils.html":[0,3],
|
||||
"group__utils.html#ga01d1ea65eb6780d91705484dd46833bf":[1,0,3,5],
|
||||
"group__utils.html#ga01d1ea65eb6780d91705484dd46833bf":[0,3,6],
|
||||
"group__utils.html#ga0ca31b2a579b6ef7c75c41324ed5367c":[0,3,18],
|
||||
"group__utils.html#ga0ca31b2a579b6ef7c75c41324ed5367c":[1,0,3,17],
|
||||
"group__utils.html#ga123e40006d54612c48c2660432dfeb23":[0,3,2],
|
||||
"group__utils.html#ga123e40006d54612c48c2660432dfeb23":[1,0,3,1],
|
||||
"group__utils.html#ga15630ddb64e977c8243892556feedfd8":[0,3,17],
|
||||
"group__utils.html#ga15630ddb64e977c8243892556feedfd8":[1,0,3,16],
|
||||
"group__utils.html#ga1bdd62a6bef7cfd6522dc1412e162559":[0,3,29],
|
||||
"group__utils.html#ga1bdd62a6bef7cfd6522dc1412e162559":[1,0,3,28],
|
||||
"group__utils.html#ga1c5ba308f71c323fbbd7eb9bb34285d4":[0,3,21],
|
||||
"group__utils.html#ga1c5ba308f71c323fbbd7eb9bb34285d4":[1,0,3,20],
|
||||
"group__utils.html#ga22347cbf977a0300726f06257edd79d6":[0,3,1],
|
||||
"group__utils.html#ga22347cbf977a0300726f06257edd79d6":[1,0,3,0],
|
||||
"group__utils.html#ga34f8c2fcee597a99c5f4c66f2119bca9":[1,0,3,4],
|
||||
"group__utils.html#ga34f8c2fcee597a99c5f4c66f2119bca9":[0,3,5],
|
||||
"group__utils.html#ga3c545b669dff7d67e5ed3c58233ccf4b":[1,0,3,6],
|
||||
"group__utils.html#ga3c545b669dff7d67e5ed3c58233ccf4b":[0,3,7],
|
||||
"group__utils.html#ga3cffe15b7e5d10a108f1734a9640a2c7":[0,3,26],
|
||||
"group__utils.html#ga3cffe15b7e5d10a108f1734a9640a2c7":[1,0,3,25],
|
||||
"group__utils.html#ga3ec2b60d1636397119c5e0c21987f791":[1,0,3,19],
|
||||
"group__utils.html#ga3ec2b60d1636397119c5e0c21987f791":[0,3,20],
|
||||
"group__utils.html#ga41163cf3a95e702f12506cd54ba3c70c":[0,3,31],
|
||||
"group__utils.html#ga41163cf3a95e702f12506cd54ba3c70c":[1,0,3,30],
|
||||
"group__utils.html#ga42702791e6da9510e4f44f33d2dad8f1":[0,3,28],
|
||||
"group__utils.html#ga42702791e6da9510e4f44f33d2dad8f1":[1,0,3,27],
|
||||
"group__utils.html#ga50cea1f8154c7c7d2abd68f1ddb33086":[0,3,10],
|
||||
"group__utils.html#ga50cea1f8154c7c7d2abd68f1ddb33086":[1,0,3,9],
|
||||
"group__utils.html#ga580d1897bc7a8cef16d5a16a2373b876":[1,0,3,3],
|
||||
"group__utils.html#ga580d1897bc7a8cef16d5a16a2373b876":[0,3,4],
|
||||
"group__utils.html#ga59cd66180162d107cf86a51c21d7e6f5":[0,3,11],
|
||||
"group__utils.html#ga59cd66180162d107cf86a51c21d7e6f5":[1,0,3,10],
|
||||
"group__utils.html#ga69037999e65cdb42d39988e0fec48af4":[1,0,3,2],
|
||||
"group__utils.html#ga69037999e65cdb42d39988e0fec48af4":[0,3,3],
|
||||
"group__utils.html#ga69373a612a7b4d264371f727217f9954":[0,3,9],
|
||||
"group__utils.html#ga69373a612a7b4d264371f727217f9954":[1,0,3,8],
|
||||
"group__utils.html#ga7bffda236a079c26302722c7d155f7a5":[1,0,3,11],
|
||||
"group__utils.html#ga7bffda236a079c26302722c7d155f7a5":[0,3,12],
|
||||
"group__utils.html#ga824373ca8e0b2fdfe3f5c4805cf2ab7e":[0,3,33],
|
||||
"group__utils.html#ga824373ca8e0b2fdfe3f5c4805cf2ab7e":[1,0,3,32],
|
||||
"group__utils.html#ga825354891d287cc86d2b4ed1b600175a":[0,3,16],
|
||||
"group__utils.html#ga825354891d287cc86d2b4ed1b600175a":[1,0,3,15],
|
||||
"group__utils.html#ga858ece77e79fb78d3db0f1851bf7fe09":[1,0,3,7],
|
||||
"group__utils.html#ga858ece77e79fb78d3db0f1851bf7fe09":[0,3,8],
|
||||
"group__utils.html#gaa23a827164f7039b9770379cbf008905":[0,3,22],
|
||||
"group__utils.html#gaa23a827164f7039b9770379cbf008905":[1,0,3,21],
|
||||
"group__utils.html#gaa820c93c2f719401b4b1ca54f6ea5c75":[1,0,3,24],
|
||||
"group__utils.html#gaa820c93c2f719401b4b1ca54f6ea5c75":[0,3,25],
|
||||
"group__utils.html#gaacf77b3345bbca43767b08ec0583fe3c":[0,3,32],
|
||||
"group__utils.html#gaacf77b3345bbca43767b08ec0583fe3c":[1,0,3,31],
|
||||
"group__utils.html#gab8050db5b87bfdee91ee92e67b063478":[0,3,30],
|
||||
"group__utils.html#gab8050db5b87bfdee91ee92e67b063478":[1,0,3,29],
|
||||
"group__utils.html#gabe3e28fe49daaf3530e203c4aed1d15f":[1,0,3,22],
|
||||
"group__utils.html#gabe3e28fe49daaf3530e203c4aed1d15f":[0,3,23],
|
||||
"group__utils.html#gabe60e8350f3e3b07ed5002ee3449a6ae":[1,0,3,14],
|
||||
"group__utils.html#gabe60e8350f3e3b07ed5002ee3449a6ae":[0,3,15],
|
||||
"group__utils.html#gacf6edf10cb84412b6bfb431ef87b56d6":[1,0,3,33],
|
||||
"group__utils.html#gacf6edf10cb84412b6bfb431ef87b56d6":[0,3,34],
|
||||
"group__utils.html#gad3d324aed0ec686314cb0f68dfde9853":[1,0,3,26],
|
||||
"group__utils.html#gad3d324aed0ec686314cb0f68dfde9853":[0,3,27],
|
||||
"group__utils.html#gad643e0fcac9e59c1a171c460633e8637":[0,3,19],
|
||||
"group__utils.html#gad643e0fcac9e59c1a171c460633e8637":[1,0,3,18],
|
||||
"group__utils.html#gad7954e6a1b9ea073c7bc894dc5af85a9":[0,3,24],
|
||||
"group__utils.html#gad7954e6a1b9ea073c7bc894dc5af85a9":[1,0,3,23],
|
||||
"group__utils.html#gadce4d1c428f979bf1cf8e1582d2f4052":[0,3,14],
|
||||
"group__utils.html#gadce4d1c428f979bf1cf8e1582d2f4052":[1,0,3,13],
|
||||
"group__utils.html#gadfa0375f8178c737deae23ffa8d152f4":[1,0,3,12],
|
||||
"group__utils.html#gadfa0375f8178c737deae23ffa8d152f4":[0,3,13],
|
||||
"index.html":[],
|
||||
"modules.html":[0],
|
||||
"pages.html":[],
|
||||
"process_8h.html":[1,0,1],
|
||||
"process_8h_source.html":[1,0,1],
|
||||
"thread_8h.html":[1,0,2],
|
||||
"thread_8h_source.html":[1,0,2],
|
||||
"utils_8h.html":[1,0,3],
|
||||
"utils_8h_source.html":[1,0,3]
|
||||
};
|
Before Width: | Height: | Size: 123 B |
|
@ -1,296 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: process.h File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('process_8h.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">process.h File Reference<div class="ingroups"><a class="el" href="group__process.html">process</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><a class="el" href="group__process.html#process">Process</a>, <a class="el" href="group__process.html#sysV">System-V</a>, and <a class="el" href="group__process.html#posix_sem">POSIX libraries</a> wrapper module.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <stdio.h></code><br />
|
||||
<code>#include <unistd.h></code><br />
|
||||
<code>#include <sys/ipc.h></code><br />
|
||||
<code>#include <sys/shm.h></code><br />
|
||||
<code>#include <sys/sem.h></code><br />
|
||||
<code>#include <semaphore.h></code><br />
|
||||
<code>#include <signal.h></code><br />
|
||||
</div>
|
||||
<p><a href="process_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Process handling</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="process"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:ga67e00aff1839b1ba68c83947593f625b"><td class="memItemLeft" align="right" valign="top">pid_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga67e00aff1839b1ba68c83947593f625b">pfork</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga67e00aff1839b1ba68c83947593f625b"><td class="mdescLeft"> </td><td class="mdescRight"><code>fork</code> wrapper function. <a href="group__process.html#ga67e00aff1839b1ba68c83947593f625b">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga67e00aff1839b1ba68c83947593f625b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad27b81fee9a0f792c4ba29fd95c967e1"><td class="memItemLeft" align="right" valign="top">pid_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gad27b81fee9a0f792c4ba29fd95c967e1">pwait</a> (int *status)</td></tr>
|
||||
<tr class="memdesc:gad27b81fee9a0f792c4ba29fd95c967e1"><td class="mdescLeft"> </td><td class="mdescRight"><code>wait</code> wrapper function. <a href="group__process.html#gad27b81fee9a0f792c4ba29fd95c967e1">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad27b81fee9a0f792c4ba29fd95c967e1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac926bd7ccd173f742b5d58f51cabcb48"><td class="memItemLeft" align="right" valign="top">pid_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gac926bd7ccd173f742b5d58f51cabcb48">pwaitpid</a> (pid_t pid, int *status, int options)</td></tr>
|
||||
<tr class="memdesc:gac926bd7ccd173f742b5d58f51cabcb48"><td class="mdescLeft"> </td><td class="mdescRight"><code>waitpid</code> wrapper function. <a href="group__process.html#gac926bd7ccd173f742b5d58f51cabcb48">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac926bd7ccd173f742b5d58f51cabcb48"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab546ccee89e3159ea7c23aa3a463a0d8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gab546ccee89e3159ea7c23aa3a463a0d8">pkill</a> (pid_t pid, int sig)</td></tr>
|
||||
<tr class="memdesc:gab546ccee89e3159ea7c23aa3a463a0d8"><td class="mdescLeft"> </td><td class="mdescRight"><code>kill</code> wrapper function. <a href="group__process.html#gab546ccee89e3159ea7c23aa3a463a0d8">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab546ccee89e3159ea7c23aa3a463a0d8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae5d3e8ac00f0e788f21020699bac758a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gae5d3e8ac00f0e788f21020699bac758a">pexecl</a> (const char *pathname, const char *arg,...)</td></tr>
|
||||
<tr class="memdesc:gae5d3e8ac00f0e788f21020699bac758a"><td class="mdescLeft"> </td><td class="mdescRight"><code>execl</code> wrapper function. <a href="group__process.html#gae5d3e8ac00f0e788f21020699bac758a">More...</a><br /></td></tr>
|
||||
<tr class="separator:gae5d3e8ac00f0e788f21020699bac758a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7c7f6de68bd3dea8a702668090a65854"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga7c7f6de68bd3dea8a702668090a65854">psigaction</a> (int signum, const struct sigaction *act, struct sigaction *oldact)</td></tr>
|
||||
<tr class="memdesc:ga7c7f6de68bd3dea8a702668090a65854"><td class="mdescLeft"> </td><td class="mdescRight"><code>sigaction</code> wrapper function. <a href="group__process.html#ga7c7f6de68bd3dea8a702668090a65854">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga7c7f6de68bd3dea8a702668090a65854"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">System V - shared memory</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="shm"></a> </p><dl class="section user"><dt>Example</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="process_8h.html">process.h</a>></span> <span class="comment">// #include <sys/shm.h></span></div>
|
||||
<div class="line">...</div>
|
||||
<div class="line">int shmid;</div>
|
||||
<div class="line"><span class="comment">// creation:</span></div>
|
||||
<div class="line">shmid = <a class="code" href="group__process.html#gaff71624be0fc9c76e0c72295721875e6">pshmget</a>(key, size, 0600 | IPC_CREAT | IPC_EXCL);</div>
|
||||
<div class="line"><span class="comment">// or, use existing:</span></div>
|
||||
<div class="line">shmid = <a class="code" href="group__process.html#gaff71624be0fc9c76e0c72295721875e6">pshmget</a>(key, 0, 0);</div>
|
||||
<div class="line">...</div>
|
||||
<div class="line"><span class="comment">// attach shm to pointer address:</span></div>
|
||||
<div class="line">void* p = <a class="code" href="group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480">pshmat</a>(shmid, NULL, 0);</div>
|
||||
<div class="line">...</div>
|
||||
<div class="line"><span class="comment">// detach shm from pointer address:</span></div>
|
||||
<div class="line">pshmdt(p);</div>
|
||||
<div class="line">...</div>
|
||||
<div class="line"><span class="comment">// destroy shm:</span></div>
|
||||
<div class="line">pshmctl(shmid, IPC_RMID, NULL);</div>
|
||||
</div><!-- fragment --> </dd></dl>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:gaff71624be0fc9c76e0c72295721875e6"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gaff71624be0fc9c76e0c72295721875e6">pshmget</a> (key_t key, size_t size, int shmflg)</td></tr>
|
||||
<tr class="memdesc:gaff71624be0fc9c76e0c72295721875e6"><td class="mdescLeft"> </td><td class="mdescRight"><code>shmget</code> wrapper function. <a href="group__process.html#gaff71624be0fc9c76e0c72295721875e6">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaff71624be0fc9c76e0c72295721875e6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3119bdf5486059aee6ec3ed65a01b319"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga3119bdf5486059aee6ec3ed65a01b319">pshmctl</a> (int shmid, int cmd, struct shmid_ds *buf)</td></tr>
|
||||
<tr class="memdesc:ga3119bdf5486059aee6ec3ed65a01b319"><td class="mdescLeft"> </td><td class="mdescRight"><code>shmctl</code> wrapper function. <a href="group__process.html#ga3119bdf5486059aee6ec3ed65a01b319">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3119bdf5486059aee6ec3ed65a01b319"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0cdba7faa458e7fb57c31d3cd8788480"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480">pshmat</a> (int shmid, const void *shmaddr, int shmflg)</td></tr>
|
||||
<tr class="memdesc:ga0cdba7faa458e7fb57c31d3cd8788480"><td class="mdescLeft"> </td><td class="mdescRight"><code>shmat</code> wrapper function. <a href="group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga0cdba7faa458e7fb57c31d3cd8788480"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1682328cd34b592404ff030779b0428f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga1682328cd34b592404ff030779b0428f">pshmdt</a> (const void *shmaddr)</td></tr>
|
||||
<tr class="memdesc:ga1682328cd34b592404ff030779b0428f"><td class="mdescLeft"> </td><td class="mdescRight"><code>shmdt</code> wrapper function. <a href="group__process.html#ga1682328cd34b592404ff030779b0428f">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1682328cd34b592404ff030779b0428f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">System V - semaphores</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="sem"></a> </p><dl class="section user"><dt>Example</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="process_8h.html">process.h</a>></span> <span class="comment">// #include <sys/sem.h></span></div>
|
||||
<div class="line">...</div>
|
||||
<div class="line">int semid;</div>
|
||||
<div class="line"><span class="comment">// creation:</span></div>
|
||||
<div class="line">semid = <a class="code" href="group__process.html#gaada159a0fe725ed843ac358be6e6a9d3">psemget</a>(key, 1, 0600 | IPC_CREAT | IPC_EXCL); <span class="comment">// 1 semaphore!</span></div>
|
||||
<div class="line"><span class="comment">// or, use existing:</span></div>
|
||||
<div class="line">semid = <a class="code" href="group__process.html#gaada159a0fe725ed843ac358be6e6a9d3">psemget</a>(key, 0, 0);</div>
|
||||
<div class="line">...</div>
|
||||
<div class="line"><span class="comment">// decrement:</span></div>
|
||||
<div class="line">struct sembuf down = {0, -1, 0};</div>
|
||||
<div class="line"><a class="code" href="group__process.html#ga0e2534c82b54573590d913c297cc4840">psemop</a>(semid, &down, 1);</div>
|
||||
<div class="line"><span class="comment">// or, simply use provided function:</span></div>
|
||||
<div class="line"><a class="code" href="group__process.html#gac2b930e9aceda9ef276b21ae8e839c16">psem_down</a>(semid, 0); <span class="comment">// NOTE: there is no sem_down in default library!</span></div>
|
||||
<div class="line">...</div>
|
||||
<div class="line"><span class="comment">// increment:</span></div>
|
||||
<div class="line">struct sembuf up = {0, 1, 0};</div>
|
||||
<div class="line"><a class="code" href="group__process.html#ga0e2534c82b54573590d913c297cc4840">psemop</a>(semid, &up, 1);</div>
|
||||
<div class="line"><span class="comment">// or, simply use provided function:</span></div>
|
||||
<div class="line"><a class="code" href="group__process.html#gaa00610fec639ef123819ceee2ef00da3">psem_up</a>(semid, 0); <span class="comment">// NOTE: there is no sem_up in default library!</span></div>
|
||||
<div class="line">...</div>
|
||||
<div class="line"><span class="comment">// destroy sem 0:</span></div>
|
||||
<div class="line">psemctl(semid, 0, IPC_RMID, NULL);</div>
|
||||
</div><!-- fragment --> </dd></dl>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:gaada159a0fe725ed843ac358be6e6a9d3"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gaada159a0fe725ed843ac358be6e6a9d3">psemget</a> (key_t key, int nsems, int semflg)</td></tr>
|
||||
<tr class="memdesc:gaada159a0fe725ed843ac358be6e6a9d3"><td class="mdescLeft"> </td><td class="mdescRight"><code>semget</code> wrapper function. <a href="group__process.html#gaada159a0fe725ed843ac358be6e6a9d3">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaada159a0fe725ed843ac358be6e6a9d3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac42e869afba098ec9bdd77444ba790c5"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gac42e869afba098ec9bdd77444ba790c5">psemctl</a> (int semid, int semnum, int cmd)</td></tr>
|
||||
<tr class="memdesc:gac42e869afba098ec9bdd77444ba790c5"><td class="mdescLeft"> </td><td class="mdescRight"><code>semctl</code> wrapper function. <a href="group__process.html#gac42e869afba098ec9bdd77444ba790c5">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac42e869afba098ec9bdd77444ba790c5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga808dab47116976fc7866c97b6dddec47"><td class="memItemLeft" align="right" valign="top">
|
||||
int </td><td class="memItemRight" valign="bottom"><b>psemctl</b> (int semid, int semnum, int cmd, void *u)</td></tr>
|
||||
<tr class="separator:ga808dab47116976fc7866c97b6dddec47"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0e2534c82b54573590d913c297cc4840"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga0e2534c82b54573590d913c297cc4840">psemop</a> (int semid, struct sembuf *sops, size_t nsops)</td></tr>
|
||||
<tr class="memdesc:ga0e2534c82b54573590d913c297cc4840"><td class="mdescLeft"> </td><td class="mdescRight"><code>semop</code> wrapper function. <a href="group__process.html#ga0e2534c82b54573590d913c297cc4840">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga0e2534c82b54573590d913c297cc4840"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaa00610fec639ef123819ceee2ef00da3"><td class="memItemLeft" align="right" valign="top">
|
||||
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gaa00610fec639ef123819ceee2ef00da3">psem_up</a> (int semid, short unsigned int index)</td></tr>
|
||||
<tr class="memdesc:gaa00610fec639ef123819ceee2ef00da3"><td class="mdescLeft"> </td><td class="mdescRight">Increment a semaphore (uses <a class="el" href="group__process.html#ga0e2534c82b54573590d913c297cc4840" title="semop wrapper function.">psemop()</a>). <br /></td></tr>
|
||||
<tr class="separator:gaa00610fec639ef123819ceee2ef00da3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac2b930e9aceda9ef276b21ae8e839c16"><td class="memItemLeft" align="right" valign="top">
|
||||
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gac2b930e9aceda9ef276b21ae8e839c16">psem_down</a> (int semid, short unsigned int index)</td></tr>
|
||||
<tr class="memdesc:gac2b930e9aceda9ef276b21ae8e839c16"><td class="mdescLeft"> </td><td class="mdescRight">Decrements a semaphore (uses <a class="el" href="group__process.html#ga0e2534c82b54573590d913c297cc4840" title="semop wrapper function.">psemop()</a>). <br /></td></tr>
|
||||
<tr class="separator:gac2b930e9aceda9ef276b21ae8e839c16"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga47891b55ba91af98c5b45cbcf154bc20"><td class="memItemLeft" align="right" valign="top">
|
||||
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga47891b55ba91af98c5b45cbcf154bc20">psem_down2</a> (int semid, short unsigned int index1, unsigned int index2)</td></tr>
|
||||
<tr class="memdesc:ga47891b55ba91af98c5b45cbcf154bc20"><td class="mdescLeft"> </td><td class="mdescRight">Decrements atomically two semaphores in a System V semaphore array (uses <a class="el" href="group__process.html#ga0e2534c82b54573590d913c297cc4840" title="semop wrapper function.">psemop()</a>). <br /></td></tr>
|
||||
<tr class="separator:ga47891b55ba91af98c5b45cbcf154bc20"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">System V - message queues</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="msg"></a> </p><dl class="section user"><dt>Example</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="process_8h.html">process.h</a>></span> <span class="comment">// #include <sys/msg.h></span></div>
|
||||
<div class="line">...</div>
|
||||
<div class="line">typedef <span class="keyword">struct </span>Item</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> ...</div>
|
||||
<div class="line">} Item;</div>
|
||||
<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>Message</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">long</span> type;</div>
|
||||
<div class="line"> Item item;</div>
|
||||
<div class="line">} Message;</div>
|
||||
<div class="line">...</div>
|
||||
<div class="line">int msgid;</div>
|
||||
<div class="line"><span class="comment">// creation:</span></div>
|
||||
<div class="line">msgid = <a class="code" href="group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7">pmsgget</a>(key, 0600 | IPC_CREAT | IPC_EXCL);</div>
|
||||
<div class="line"><span class="comment">// or, use existing:</span></div>
|
||||
<div class="line">msgid = <a class="code" href="group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7">pmsgget</a>(key, 0);</div>
|
||||
<div class="line">...</div>
|
||||
<div class="line">Message msg;</div>
|
||||
<div class="line"><span class="comment">// send msg:</span></div>
|
||||
<div class="line">msg = ...;</div>
|
||||
<div class="line"><a class="code" href="group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a">pmsgsnd</a>(msgid, &msg, <span class="keyword">sizeof</span>(Item), 0);</div>
|
||||
<div class="line">...</div>
|
||||
<div class="line"><span class="comment">// receive msg:</span></div>
|
||||
<div class="line">pmsgrcv(msgid, &msg, <span class="keyword">sizeof</span>(Item), type, 0);</div>
|
||||
<div class="line">...</div>
|
||||
<div class="line"><span class="comment">// destroy msg:</span></div>
|
||||
<div class="line">pmsgctl(msgid, IPC_RMID, NULL);</div>
|
||||
</div><!-- fragment --> </dd></dl>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:gad426e03bc9b8dae5f1fbf889ce2dd8f7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7">pmsgget</a> (key_t key, int msgflg)</td></tr>
|
||||
<tr class="memdesc:gad426e03bc9b8dae5f1fbf889ce2dd8f7"><td class="mdescLeft"> </td><td class="mdescRight"><code>msgget</code> wrapper function. <a href="group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad426e03bc9b8dae5f1fbf889ce2dd8f7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga13bfac41329ec74b2aa4950f9586ae9f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga13bfac41329ec74b2aa4950f9586ae9f">pmsgctl</a> (int msqid, int cmd, struct msqid_ds *buf)</td></tr>
|
||||
<tr class="memdesc:ga13bfac41329ec74b2aa4950f9586ae9f"><td class="mdescLeft"> </td><td class="mdescRight"><code>msgctl</code> wrapper function. <a href="group__process.html#ga13bfac41329ec74b2aa4950f9586ae9f">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga13bfac41329ec74b2aa4950f9586ae9f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaeeb6cd0ab585a7769cd17405f600e56a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a">pmsgsnd</a> (int msqid, const void *msgp, size_t msgsz, int msgflg)</td></tr>
|
||||
<tr class="memdesc:gaeeb6cd0ab585a7769cd17405f600e56a"><td class="mdescLeft"> </td><td class="mdescRight"><code>msgsnd</code> wrapper function. <a href="group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaeeb6cd0ab585a7769cd17405f600e56a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gacd4e4161a46bfa2e1f23eb1d49aaa07b"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gacd4e4161a46bfa2e1f23eb1d49aaa07b">pmsgrcv</a> (int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg)</td></tr>
|
||||
<tr class="memdesc:gacd4e4161a46bfa2e1f23eb1d49aaa07b"><td class="mdescLeft"> </td><td class="mdescRight"><code>msgrcv</code> wrapper function. <a href="group__process.html#gacd4e4161a46bfa2e1f23eb1d49aaa07b">More...</a><br /></td></tr>
|
||||
<tr class="separator:gacd4e4161a46bfa2e1f23eb1d49aaa07b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">POSIX semaphores</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="posix_sem"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba"><td class="memItemLeft" align="right" valign="top">sem_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba">psem_open</a> (const char *name, int oflag)</td></tr>
|
||||
<tr class="memdesc:ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba"><td class="mdescLeft"> </td><td class="mdescRight"><code>sem_open</code> wrapper function. <a href="group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gabfb2ccd43b219304d77429977a3fb70b"><td class="memItemLeft" align="right" valign="top">
|
||||
sem_t * </td><td class="memItemRight" valign="bottom"><b>psem_open</b> (const char *name, int oflag, mode_t mode, unsigned int value)</td></tr>
|
||||
<tr class="separator:gabfb2ccd43b219304d77429977a3fb70b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga41a884c3a9d9ac6a31fc6ab27ae1d668"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga41a884c3a9d9ac6a31fc6ab27ae1d668">psem_close</a> (sem_t *sem)</td></tr>
|
||||
<tr class="memdesc:ga41a884c3a9d9ac6a31fc6ab27ae1d668"><td class="mdescLeft"> </td><td class="mdescRight"><code>sem_close</code> wrapper function. <a href="group__process.html#ga41a884c3a9d9ac6a31fc6ab27ae1d668">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga41a884c3a9d9ac6a31fc6ab27ae1d668"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0415c9c4fab4baafef6cd2d40becd05e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga0415c9c4fab4baafef6cd2d40becd05e">psem_unlink</a> (const char *name)</td></tr>
|
||||
<tr class="memdesc:ga0415c9c4fab4baafef6cd2d40becd05e"><td class="mdescLeft"> </td><td class="mdescRight"><code>sem_unlink</code> wrapper function. <a href="group__process.html#ga0415c9c4fab4baafef6cd2d40becd05e">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga0415c9c4fab4baafef6cd2d40becd05e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac49ddb266cec5493ebd756cd9382f99d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gac49ddb266cec5493ebd756cd9382f99d">psem_init</a> (sem_t *sem, int pshared, unsigned int value)</td></tr>
|
||||
<tr class="memdesc:gac49ddb266cec5493ebd756cd9382f99d"><td class="mdescLeft"> </td><td class="mdescRight"><code>sem_init</code> wrapper function. <a href="group__process.html#gac49ddb266cec5493ebd756cd9382f99d">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac49ddb266cec5493ebd756cd9382f99d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga82e3d1015521711a2a6374d6c3771491"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga82e3d1015521711a2a6374d6c3771491">psem_destroy</a> (sem_t *sem)</td></tr>
|
||||
<tr class="memdesc:ga82e3d1015521711a2a6374d6c3771491"><td class="mdescLeft"> </td><td class="mdescRight"><code>sem_destroy</code> wrapper function. <a href="group__process.html#ga82e3d1015521711a2a6374d6c3771491">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga82e3d1015521711a2a6374d6c3771491"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae2c867f9f66e74fad44df3f32f87a8c6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gae2c867f9f66e74fad44df3f32f87a8c6">psem_wait</a> (sem_t *sem)</td></tr>
|
||||
<tr class="memdesc:gae2c867f9f66e74fad44df3f32f87a8c6"><td class="mdescLeft"> </td><td class="mdescRight"><code>sem_wait</code> wrapper function. <a href="group__process.html#gae2c867f9f66e74fad44df3f32f87a8c6">More...</a><br /></td></tr>
|
||||
<tr class="separator:gae2c867f9f66e74fad44df3f32f87a8c6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga04cb3c84545fe7707c63578e1d59b689"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga04cb3c84545fe7707c63578e1d59b689">psem_trywait</a> (sem_t *sem)</td></tr>
|
||||
<tr class="memdesc:ga04cb3c84545fe7707c63578e1d59b689"><td class="mdescLeft"> </td><td class="mdescRight"><code>sem_trywait</code> wrapper function. <a href="group__process.html#ga04cb3c84545fe7707c63578e1d59b689">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga04cb3c84545fe7707c63578e1d59b689"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac8b2b3d1e18b385f10b389ce2ea734ef"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gac8b2b3d1e18b385f10b389ce2ea734ef">psem_timedwait</a> (sem_t *sem, const struct timespec *abs_timeout)</td></tr>
|
||||
<tr class="memdesc:gac8b2b3d1e18b385f10b389ce2ea734ef"><td class="mdescLeft"> </td><td class="mdescRight"><code>sem_timedwait</code> wrapper function. <a href="group__process.html#gac8b2b3d1e18b385f10b389ce2ea734ef">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac8b2b3d1e18b385f10b389ce2ea734ef"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad63921c4ec6f0845b752eb59a8935b8e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#gad63921c4ec6f0845b752eb59a8935b8e">psem_post</a> (sem_t *sem)</td></tr>
|
||||
<tr class="memdesc:gad63921c4ec6f0845b752eb59a8935b8e"><td class="mdescLeft"> </td><td class="mdescRight"><code>sem_post</code> wrapper function. <a href="group__process.html#gad63921c4ec6f0845b752eb59a8935b8e">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad63921c4ec6f0845b752eb59a8935b8e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">UNIX pipes</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="pipes"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:ga013466fa89ac97a0db0ccd78168a8456"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga013466fa89ac97a0db0ccd78168a8456">ppipe</a> (int pipefd[2])</td></tr>
|
||||
<tr class="memdesc:ga013466fa89ac97a0db0ccd78168a8456"><td class="mdescLeft"> </td><td class="mdescRight"><code>pipe</code> wrapper function. <a href="group__process.html#ga013466fa89ac97a0db0ccd78168a8456">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga013466fa89ac97a0db0ccd78168a8456"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga2d9df322812707050312aa24d15a4360"><td class="memItemLeft" align="right" valign="top">FILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga2d9df322812707050312aa24d15a4360">ppopen</a> (const char *command, const char *type)</td></tr>
|
||||
<tr class="memdesc:ga2d9df322812707050312aa24d15a4360"><td class="mdescLeft"> </td><td class="mdescRight"><code>popen</code> wrapper function. <a href="group__process.html#ga2d9df322812707050312aa24d15a4360">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga2d9df322812707050312aa24d15a4360"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1490f6e0ca0ebf607d1f5ff431c79b68"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__process.html#ga1490f6e0ca0ebf607d1f5ff431c79b68">ppclose</a> (FILE *stream)</td></tr>
|
||||
<tr class="memdesc:ga1490f6e0ca0ebf607d1f5ff431c79b68"><td class="mdescLeft"> </td><td class="mdescRight"><code>pclose</code> wrapper function. <a href="group__process.html#ga1490f6e0ca0ebf607d1f5ff431c79b68">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1490f6e0ca0ebf607d1f5ff431c79b68"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p><a class="el" href="group__process.html#process">Process</a>, <a class="el" href="group__process.html#sysV">System-V</a>, and <a class="el" href="group__process.html#posix_sem">POSIX libraries</a> wrapper module. </p>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>Removes defensive programming from native libraries </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="agroup__process_html_ga0cdba7faa458e7fb57c31d3cd8788480"><div class="ttname"><a href="group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480">pshmat</a></div><div class="ttdeci">void * pshmat(int shmid, const void *shmaddr, int shmflg)</div><div class="ttdoc">shmat wrapper function.</div></div>
|
||||
<div class="ttc" id="aprocess_8h_html"><div class="ttname"><a href="process_8h.html">process.h</a></div><div class="ttdoc">Process, System-V, and POSIX libraries wrapper module.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gaada159a0fe725ed843ac358be6e6a9d3"><div class="ttname"><a href="group__process.html#gaada159a0fe725ed843ac358be6e6a9d3">psemget</a></div><div class="ttdeci">int psemget(key_t key, int nsems, int semflg)</div><div class="ttdoc">semget wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gaff71624be0fc9c76e0c72295721875e6"><div class="ttname"><a href="group__process.html#gaff71624be0fc9c76e0c72295721875e6">pshmget</a></div><div class="ttdeci">int pshmget(key_t key, size_t size, int shmflg)</div><div class="ttdoc">shmget wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gaeeb6cd0ab585a7769cd17405f600e56a"><div class="ttname"><a href="group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a">pmsgsnd</a></div><div class="ttdeci">void pmsgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg)</div><div class="ttdoc">msgsnd wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gad426e03bc9b8dae5f1fbf889ce2dd8f7"><div class="ttname"><a href="group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7">pmsgget</a></div><div class="ttdeci">int pmsgget(key_t key, int msgflg)</div><div class="ttdoc">msgget wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gac2b930e9aceda9ef276b21ae8e839c16"><div class="ttname"><a href="group__process.html#gac2b930e9aceda9ef276b21ae8e839c16">psem_down</a></div><div class="ttdeci">void psem_down(int semid, short unsigned int index)</div><div class="ttdoc">Decrements a semaphore (uses psemop()).</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gaa00610fec639ef123819ceee2ef00da3"><div class="ttname"><a href="group__process.html#gaa00610fec639ef123819ceee2ef00da3">psem_up</a></div><div class="ttdeci">void psem_up(int semid, short unsigned int index)</div><div class="ttdoc">Increment a semaphore (uses psemop()).</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga0e2534c82b54573590d913c297cc4840"><div class="ttname"><a href="group__process.html#ga0e2534c82b54573590d913c297cc4840">psemop</a></div><div class="ttdeci">void psemop(int semid, struct sembuf *sops, size_t nsops)</div><div class="ttdoc">semop wrapper function.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="process_8h.html">process.h</a></li>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,35 +0,0 @@
|
|||
var process_8h =
|
||||
[
|
||||
[ "pfork", "group__process.html#ga67e00aff1839b1ba68c83947593f625b", null ],
|
||||
[ "pwait", "group__process.html#gad27b81fee9a0f792c4ba29fd95c967e1", null ],
|
||||
[ "pwaitpid", "group__process.html#gac926bd7ccd173f742b5d58f51cabcb48", null ],
|
||||
[ "pkill", "group__process.html#gab546ccee89e3159ea7c23aa3a463a0d8", null ],
|
||||
[ "pexecl", "group__process.html#gae5d3e8ac00f0e788f21020699bac758a", null ],
|
||||
[ "psigaction", "group__process.html#ga7c7f6de68bd3dea8a702668090a65854", null ],
|
||||
[ "pshmget", "group__process.html#gaff71624be0fc9c76e0c72295721875e6", null ],
|
||||
[ "pshmctl", "group__process.html#ga3119bdf5486059aee6ec3ed65a01b319", null ],
|
||||
[ "pshmat", "group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480", null ],
|
||||
[ "pshmdt", "group__process.html#ga1682328cd34b592404ff030779b0428f", null ],
|
||||
[ "psemget", "group__process.html#gaada159a0fe725ed843ac358be6e6a9d3", null ],
|
||||
[ "psemctl", "group__process.html#gac42e869afba098ec9bdd77444ba790c5", null ],
|
||||
[ "psemop", "group__process.html#ga0e2534c82b54573590d913c297cc4840", null ],
|
||||
[ "psem_up", "group__process.html#gaa00610fec639ef123819ceee2ef00da3", null ],
|
||||
[ "psem_down", "group__process.html#gac2b930e9aceda9ef276b21ae8e839c16", null ],
|
||||
[ "psem_down2", "group__process.html#ga47891b55ba91af98c5b45cbcf154bc20", null ],
|
||||
[ "pmsgget", "group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7", null ],
|
||||
[ "pmsgctl", "group__process.html#ga13bfac41329ec74b2aa4950f9586ae9f", null ],
|
||||
[ "pmsgsnd", "group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a", null ],
|
||||
[ "pmsgrcv", "group__process.html#gacd4e4161a46bfa2e1f23eb1d49aaa07b", null ],
|
||||
[ "psem_open", "group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba", null ],
|
||||
[ "psem_close", "group__process.html#ga41a884c3a9d9ac6a31fc6ab27ae1d668", null ],
|
||||
[ "psem_unlink", "group__process.html#ga0415c9c4fab4baafef6cd2d40becd05e", null ],
|
||||
[ "psem_init", "group__process.html#gac49ddb266cec5493ebd756cd9382f99d", null ],
|
||||
[ "psem_destroy", "group__process.html#ga82e3d1015521711a2a6374d6c3771491", null ],
|
||||
[ "psem_wait", "group__process.html#gae2c867f9f66e74fad44df3f32f87a8c6", null ],
|
||||
[ "psem_trywait", "group__process.html#ga04cb3c84545fe7707c63578e1d59b689", null ],
|
||||
[ "psem_timedwait", "group__process.html#gac8b2b3d1e18b385f10b389ce2ea734ef", null ],
|
||||
[ "psem_post", "group__process.html#gad63921c4ec6f0845b752eb59a8935b8e", null ],
|
||||
[ "ppipe", "group__process.html#ga013466fa89ac97a0db0ccd78168a8456", null ],
|
||||
[ "ppopen", "group__process.html#ga2d9df322812707050312aa24d15a4360", null ],
|
||||
[ "ppclose", "group__process.html#ga1490f6e0ca0ebf607d1f5ff431c79b68", null ]
|
||||
];
|
|
@ -1,201 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: process.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('process_8h_source.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">process.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="process_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
|
||||
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor">#ifndef PROCESS_H</span></div>
|
||||
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor">#define PROCESS_H</span></div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  </div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="preprocessor">#include <stdio.h></span></div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="preprocessor">#include <unistd.h></span></div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="preprocessor">#include <sys/ipc.h></span></div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="preprocessor">#include <sys/shm.h></span></div>
|
||||
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="preprocessor">#include <sys/sem.h></span></div>
|
||||
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="preprocessor">#include <semaphore.h></span></div>
|
||||
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="preprocessor">#include <signal.h></span></div>
|
||||
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  </div>
|
||||
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment">//#define EXCEPTION_POLICY</span></div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment">//#define EXIT_POLICY // DEFAULT</span></div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  </div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  </div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> pid_t <a class="code" href="group__process.html#ga67e00aff1839b1ba68c83947593f625b">pfork</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  </div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> pid_t <a class="code" href="group__process.html#gad27b81fee9a0f792c4ba29fd95c967e1">pwait</a>(<span class="keywordtype">int</span> *status);</div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  </div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> pid_t <a class="code" href="group__process.html#gac926bd7ccd173f742b5d58f51cabcb48">pwaitpid</a>(pid_t pid, <span class="keywordtype">int</span> *status, <span class="keywordtype">int</span> options);</div>
|
||||
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  </div>
|
||||
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#gab546ccee89e3159ea7c23aa3a463a0d8">pkill</a>(pid_t pid, <span class="keywordtype">int</span> sig);</div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  </div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#gae5d3e8ac00f0e788f21020699bac758a">pexecl</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *pathname, <span class="keyword">const</span> <span class="keywordtype">char</span> *arg, ... <span class="comment">/* (char *) NULL */</span>);</div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  </div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#ga7c7f6de68bd3dea8a702668090a65854">psigaction</a>(<span class="keywordtype">int</span> signum, <span class="keyword">const</span> <span class="keyword">struct</span> sigaction *act, <span class="keyword">struct</span> sigaction *oldact);</div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  </div>
|
||||
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span> <span class="keywordtype">int</span> <a class="code" href="group__process.html#gaff71624be0fc9c76e0c72295721875e6">pshmget</a>(key_t key, <span class="keywordtype">size_t</span> size, <span class="keywordtype">int</span> shmflg);</div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  </div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="keywordtype">int</span> <a class="code" href="group__process.html#ga3119bdf5486059aee6ec3ed65a01b319">pshmctl</a>(<span class="keywordtype">int</span> shmid, <span class="keywordtype">int</span> cmd, <span class="keyword">struct</span> shmid_ds *buf);</div>
|
||||
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  </div>
|
||||
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="keywordtype">void</span> *<a class="code" href="group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480">pshmat</a>(<span class="keywordtype">int</span> shmid, <span class="keyword">const</span> <span class="keywordtype">void</span> *shmaddr, <span class="keywordtype">int</span> shmflg);</div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  </div>
|
||||
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#ga1682328cd34b592404ff030779b0428f">pshmdt</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *shmaddr);</div>
|
||||
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  </div>
|
||||
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span> <span class="keywordtype">int</span> <a class="code" href="group__process.html#gaada159a0fe725ed843ac358be6e6a9d3">psemget</a>(key_t key, <span class="keywordtype">int</span> nsems, <span class="keywordtype">int</span> semflg);</div>
|
||||
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  </div>
|
||||
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span> <span class="keywordtype">int</span> <a class="code" href="group__process.html#gac42e869afba098ec9bdd77444ba790c5">psemctl</a>(<span class="keywordtype">int</span> semid, <span class="keywordtype">int</span> semnum, <span class="keywordtype">int</span> cmd);</div>
|
||||
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span> <span class="keywordtype">int</span> <a class="code" href="group__process.html#gac42e869afba098ec9bdd77444ba790c5">psemctl</a>(<span class="keywordtype">int</span> semid, <span class="keywordtype">int</span> semnum, <span class="keywordtype">int</span> cmd, <span class="keywordtype">void</span> *u);</div>
|
||||
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  </div>
|
||||
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#ga0e2534c82b54573590d913c297cc4840">psemop</a>(<span class="keywordtype">int</span> semid, <span class="keyword">struct</span> sembuf *sops, <span class="keywordtype">size_t</span> nsops);</div>
|
||||
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  </div>
|
||||
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#gaa00610fec639ef123819ceee2ef00da3">psem_up</a>(<span class="keywordtype">int</span> semid, <span class="keywordtype">short</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index);</div>
|
||||
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  </div>
|
||||
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#gac2b930e9aceda9ef276b21ae8e839c16">psem_down</a>(<span class="keywordtype">int</span> semid, <span class="keywordtype">short</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index);</div>
|
||||
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  </div>
|
||||
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#ga47891b55ba91af98c5b45cbcf154bc20">psem_down2</a>(<span class="keywordtype">int</span> semid, <span class="keywordtype">short</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index2);</div>
|
||||
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  </div>
|
||||
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span> <span class="keywordtype">int</span> <a class="code" href="group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7">pmsgget</a>(key_t key, <span class="keywordtype">int</span> msgflg);</div>
|
||||
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  </div>
|
||||
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span> <span class="keywordtype">int</span> <a class="code" href="group__process.html#ga13bfac41329ec74b2aa4950f9586ae9f">pmsgctl</a>(<span class="keywordtype">int</span> msqid, <span class="keywordtype">int</span> cmd, <span class="keyword">struct</span> msqid_ds *buf);</div>
|
||||
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  </div>
|
||||
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a">pmsgsnd</a>(<span class="keywordtype">int</span> msqid, <span class="keyword">const</span> <span class="keywordtype">void</span> *msgp, <span class="keywordtype">size_t</span> msgsz, <span class="keywordtype">int</span> msgflg);</div>
|
||||
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  </div>
|
||||
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span> <span class="keywordtype">size_t</span> <a class="code" href="group__process.html#gacd4e4161a46bfa2e1f23eb1d49aaa07b">pmsgrcv</a>(<span class="keywordtype">int</span> msqid, <span class="keywordtype">void</span> *msgp, <span class="keywordtype">size_t</span> msgsz, <span class="keywordtype">long</span> msgtyp, <span class="keywordtype">int</span> msgflg);</div>
|
||||
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  </div>
|
||||
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span> <span class="comment">// named:</span></div>
|
||||
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span> <span class="comment"></span>sem_t *<a class="code" href="group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba">psem_open</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> oflag);</div>
|
||||
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span> sem_t *<a class="code" href="group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba">psem_open</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> oflag, mode_t mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> value);</div>
|
||||
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  </div>
|
||||
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#ga41a884c3a9d9ac6a31fc6ab27ae1d668">psem_close</a>(sem_t *sem);</div>
|
||||
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  </div>
|
||||
<div class="line"><a name="l00393"></a><span class="lineno"> 393</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#ga0415c9c4fab4baafef6cd2d40becd05e">psem_unlink</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name);</div>
|
||||
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  </div>
|
||||
<div class="line"><a name="l00395"></a><span class="lineno"> 395</span> <span class="comment">// unnamed:</span></div>
|
||||
<div class="line"><a name="l00407"></a><span class="lineno"> 407</span> <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="group__process.html#gac49ddb266cec5493ebd756cd9382f99d">psem_init</a>(sem_t *sem, <span class="keywordtype">int</span> pshared, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> value);</div>
|
||||
<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  </div>
|
||||
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#ga82e3d1015521711a2a6374d6c3771491">psem_destroy</a>(sem_t *sem);</div>
|
||||
<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  </div>
|
||||
<div class="line"><a name="l00422"></a><span class="lineno"> 422</span> <span class="comment">// named and unnamed:</span></div>
|
||||
<div class="line"><a name="l00434"></a><span class="lineno"> 434</span> <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="group__process.html#gae2c867f9f66e74fad44df3f32f87a8c6">psem_wait</a>(sem_t *sem);</div>
|
||||
<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  </div>
|
||||
<div class="line"><a name="l00449"></a><span class="lineno"> 449</span> <span class="keywordtype">int</span> <a class="code" href="group__process.html#ga04cb3c84545fe7707c63578e1d59b689">psem_trywait</a>(sem_t *sem);</div>
|
||||
<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  </div>
|
||||
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span> <span class="keywordtype">int</span> <a class="code" href="group__process.html#gac8b2b3d1e18b385f10b389ce2ea734ef">psem_timedwait</a>(sem_t *sem, <span class="keyword">const</span> <span class="keyword">struct</span> timespec *abs_timeout);</div>
|
||||
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  </div>
|
||||
<div class="line"><a name="l00477"></a><span class="lineno"> 477</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#gad63921c4ec6f0845b752eb59a8935b8e">psem_post</a>(sem_t *sem);</div>
|
||||
<div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  </div>
|
||||
<div class="line"><a name="l00492"></a><span class="lineno"> 492</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#ga013466fa89ac97a0db0ccd78168a8456">ppipe</a>(<span class="keywordtype">int</span> pipefd[2]);</div>
|
||||
<div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  </div>
|
||||
<div class="line"><a name="l00506"></a><span class="lineno"> 506</span> FILE *<a class="code" href="group__process.html#ga2d9df322812707050312aa24d15a4360">ppopen</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *command, <span class="keyword">const</span> <span class="keywordtype">char</span> *type);</div>
|
||||
<div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  </div>
|
||||
<div class="line"><a name="l00519"></a><span class="lineno"> 519</span> <span class="keywordtype">void</span> <a class="code" href="group__process.html#ga1490f6e0ca0ebf607d1f5ff431c79b68">ppclose</a>(FILE *stream);</div>
|
||||
<div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  </div>
|
||||
<div class="line"><a name="l00524"></a><span class="lineno"> 524</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  </div>
|
||||
<div class="line"><a name="l00526"></a><span class="lineno"> 526</span> <span class="comment">/* ************************************************** */</span></div>
|
||||
<div class="line"><a name="l00530"></a><span class="lineno"> 530</span> <span class="comment">/* ************************************************** */</span></div>
|
||||
<div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  </div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="agroup__process_html_gac8b2b3d1e18b385f10b389ce2ea734ef"><div class="ttname"><a href="group__process.html#gac8b2b3d1e18b385f10b389ce2ea734ef">psem_timedwait</a></div><div class="ttdeci">int psem_timedwait(sem_t *sem, const struct timespec *abs_timeout)</div><div class="ttdoc">sem_timedwait wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gab546ccee89e3159ea7c23aa3a463a0d8"><div class="ttname"><a href="group__process.html#gab546ccee89e3159ea7c23aa3a463a0d8">pkill</a></div><div class="ttdeci">void pkill(pid_t pid, int sig)</div><div class="ttdoc">kill wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gac49ddb266cec5493ebd756cd9382f99d"><div class="ttname"><a href="group__process.html#gac49ddb266cec5493ebd756cd9382f99d">psem_init</a></div><div class="ttdeci">void psem_init(sem_t *sem, int pshared, unsigned int value)</div><div class="ttdoc">sem_init wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga47891b55ba91af98c5b45cbcf154bc20"><div class="ttname"><a href="group__process.html#ga47891b55ba91af98c5b45cbcf154bc20">psem_down2</a></div><div class="ttdeci">void psem_down2(int semid, short unsigned int index1, unsigned int index2)</div><div class="ttdoc">Decrements atomically two semaphores in a System V semaphore array (uses psemop()).</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga04cb3c84545fe7707c63578e1d59b689"><div class="ttname"><a href="group__process.html#ga04cb3c84545fe7707c63578e1d59b689">psem_trywait</a></div><div class="ttdeci">int psem_trywait(sem_t *sem)</div><div class="ttdoc">sem_trywait wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gac42e869afba098ec9bdd77444ba790c5"><div class="ttname"><a href="group__process.html#gac42e869afba098ec9bdd77444ba790c5">psemctl</a></div><div class="ttdeci">int psemctl(int semid, int semnum, int cmd)</div><div class="ttdoc">semctl wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gae2c867f9f66e74fad44df3f32f87a8c6"><div class="ttname"><a href="group__process.html#gae2c867f9f66e74fad44df3f32f87a8c6">psem_wait</a></div><div class="ttdeci">void psem_wait(sem_t *sem)</div><div class="ttdoc">sem_wait wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga0415c9c4fab4baafef6cd2d40becd05e"><div class="ttname"><a href="group__process.html#ga0415c9c4fab4baafef6cd2d40becd05e">psem_unlink</a></div><div class="ttdeci">void psem_unlink(const char *name)</div><div class="ttdoc">sem_unlink wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga0cdba7faa458e7fb57c31d3cd8788480"><div class="ttname"><a href="group__process.html#ga0cdba7faa458e7fb57c31d3cd8788480">pshmat</a></div><div class="ttdeci">void * pshmat(int shmid, const void *shmaddr, int shmflg)</div><div class="ttdoc">shmat wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga1490f6e0ca0ebf607d1f5ff431c79b68"><div class="ttname"><a href="group__process.html#ga1490f6e0ca0ebf607d1f5ff431c79b68">ppclose</a></div><div class="ttdeci">void ppclose(FILE *stream)</div><div class="ttdoc">pclose wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gaada159a0fe725ed843ac358be6e6a9d3"><div class="ttname"><a href="group__process.html#gaada159a0fe725ed843ac358be6e6a9d3">psemget</a></div><div class="ttdeci">int psemget(key_t key, int nsems, int semflg)</div><div class="ttdoc">semget wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga82e3d1015521711a2a6374d6c3771491"><div class="ttname"><a href="group__process.html#ga82e3d1015521711a2a6374d6c3771491">psem_destroy</a></div><div class="ttdeci">void psem_destroy(sem_t *sem)</div><div class="ttdoc">sem_destroy wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga013466fa89ac97a0db0ccd78168a8456"><div class="ttname"><a href="group__process.html#ga013466fa89ac97a0db0ccd78168a8456">ppipe</a></div><div class="ttdeci">void ppipe(int pipefd[2])</div><div class="ttdoc">pipe wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba"><div class="ttname"><a href="group__process.html#ga7bf7fce2d1f344e7dfeeb1b46a9ee7ba">psem_open</a></div><div class="ttdeci">sem_t * psem_open(const char *name, int oflag)</div><div class="ttdoc">sem_open wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gae5d3e8ac00f0e788f21020699bac758a"><div class="ttname"><a href="group__process.html#gae5d3e8ac00f0e788f21020699bac758a">pexecl</a></div><div class="ttdeci">void pexecl(const char *pathname, const char *arg,...)</div><div class="ttdoc">execl wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga67e00aff1839b1ba68c83947593f625b"><div class="ttname"><a href="group__process.html#ga67e00aff1839b1ba68c83947593f625b">pfork</a></div><div class="ttdeci">pid_t pfork(void)</div><div class="ttdoc">fork wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga2d9df322812707050312aa24d15a4360"><div class="ttname"><a href="group__process.html#ga2d9df322812707050312aa24d15a4360">ppopen</a></div><div class="ttdeci">FILE * ppopen(const char *command, const char *type)</div><div class="ttdoc">popen wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gad63921c4ec6f0845b752eb59a8935b8e"><div class="ttname"><a href="group__process.html#gad63921c4ec6f0845b752eb59a8935b8e">psem_post</a></div><div class="ttdeci">void psem_post(sem_t *sem)</div><div class="ttdoc">sem_post wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gaff71624be0fc9c76e0c72295721875e6"><div class="ttname"><a href="group__process.html#gaff71624be0fc9c76e0c72295721875e6">pshmget</a></div><div class="ttdeci">int pshmget(key_t key, size_t size, int shmflg)</div><div class="ttdoc">shmget wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gac926bd7ccd173f742b5d58f51cabcb48"><div class="ttname"><a href="group__process.html#gac926bd7ccd173f742b5d58f51cabcb48">pwaitpid</a></div><div class="ttdeci">pid_t pwaitpid(pid_t pid, int *status, int options)</div><div class="ttdoc">waitpid wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gaeeb6cd0ab585a7769cd17405f600e56a"><div class="ttname"><a href="group__process.html#gaeeb6cd0ab585a7769cd17405f600e56a">pmsgsnd</a></div><div class="ttdeci">void pmsgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg)</div><div class="ttdoc">msgsnd wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gad426e03bc9b8dae5f1fbf889ce2dd8f7"><div class="ttname"><a href="group__process.html#gad426e03bc9b8dae5f1fbf889ce2dd8f7">pmsgget</a></div><div class="ttdeci">int pmsgget(key_t key, int msgflg)</div><div class="ttdoc">msgget wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gac2b930e9aceda9ef276b21ae8e839c16"><div class="ttname"><a href="group__process.html#gac2b930e9aceda9ef276b21ae8e839c16">psem_down</a></div><div class="ttdeci">void psem_down(int semid, short unsigned int index)</div><div class="ttdoc">Decrements a semaphore (uses psemop()).</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga3119bdf5486059aee6ec3ed65a01b319"><div class="ttname"><a href="group__process.html#ga3119bdf5486059aee6ec3ed65a01b319">pshmctl</a></div><div class="ttdeci">int pshmctl(int shmid, int cmd, struct shmid_ds *buf)</div><div class="ttdoc">shmctl wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga1682328cd34b592404ff030779b0428f"><div class="ttname"><a href="group__process.html#ga1682328cd34b592404ff030779b0428f">pshmdt</a></div><div class="ttdeci">void pshmdt(const void *shmaddr)</div><div class="ttdoc">shmdt wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga41a884c3a9d9ac6a31fc6ab27ae1d668"><div class="ttname"><a href="group__process.html#ga41a884c3a9d9ac6a31fc6ab27ae1d668">psem_close</a></div><div class="ttdeci">void psem_close(sem_t *sem)</div><div class="ttdoc">sem_close wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga7c7f6de68bd3dea8a702668090a65854"><div class="ttname"><a href="group__process.html#ga7c7f6de68bd3dea8a702668090a65854">psigaction</a></div><div class="ttdeci">void psigaction(int signum, const struct sigaction *act, struct sigaction *oldact)</div><div class="ttdoc">sigaction wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gacd4e4161a46bfa2e1f23eb1d49aaa07b"><div class="ttname"><a href="group__process.html#gacd4e4161a46bfa2e1f23eb1d49aaa07b">pmsgrcv</a></div><div class="ttdeci">size_t pmsgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg)</div><div class="ttdoc">msgrcv wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gaa00610fec639ef123819ceee2ef00da3"><div class="ttname"><a href="group__process.html#gaa00610fec639ef123819ceee2ef00da3">psem_up</a></div><div class="ttdeci">void psem_up(int semid, short unsigned int index)</div><div class="ttdoc">Increment a semaphore (uses psemop()).</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga13bfac41329ec74b2aa4950f9586ae9f"><div class="ttname"><a href="group__process.html#ga13bfac41329ec74b2aa4950f9586ae9f">pmsgctl</a></div><div class="ttdeci">int pmsgctl(int msqid, int cmd, struct msqid_ds *buf)</div><div class="ttdoc">msgctl wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_gad27b81fee9a0f792c4ba29fd95c967e1"><div class="ttname"><a href="group__process.html#gad27b81fee9a0f792c4ba29fd95c967e1">pwait</a></div><div class="ttdeci">pid_t pwait(int *status)</div><div class="ttdoc">wait wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__process_html_ga0e2534c82b54573590d913c297cc4840"><div class="ttname"><a href="group__process.html#ga0e2534c82b54573590d913c297cc4840">psemop</a></div><div class="ttdeci">void psemop(int semid, struct sembuf *sops, size_t nsops)</div><div class="ttdoc">semop wrapper function.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="process_8h.html">process.h</a></li>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,137 +0,0 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this file.
|
||||
|
||||
Copyright (C) 1997-2017 by Dimitri van Heesch
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This 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 program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this file
|
||||
*/
|
||||
function initResizable()
|
||||
{
|
||||
var cookie_namespace = 'doxygen';
|
||||
var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight;
|
||||
|
||||
function readCookie(cookie)
|
||||
{
|
||||
var myCookie = cookie_namespace+"_"+cookie+"=";
|
||||
if (document.cookie) {
|
||||
var index = document.cookie.indexOf(myCookie);
|
||||
if (index != -1) {
|
||||
var valStart = index + myCookie.length;
|
||||
var valEnd = document.cookie.indexOf(";", valStart);
|
||||
if (valEnd == -1) {
|
||||
valEnd = document.cookie.length;
|
||||
}
|
||||
var val = document.cookie.substring(valStart, valEnd);
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function writeCookie(cookie, val, expiration)
|
||||
{
|
||||
if (val==undefined) return;
|
||||
if (expiration == null) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
|
||||
expiration = date.toGMTString();
|
||||
}
|
||||
document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/";
|
||||
}
|
||||
|
||||
function resizeWidth()
|
||||
{
|
||||
var windowWidth = $(window).width() + "px";
|
||||
var sidenavWidth = $(sidenav).outerWidth();
|
||||
content.css({marginLeft:parseInt(sidenavWidth)+"px"});
|
||||
writeCookie('width',sidenavWidth-barWidth, null);
|
||||
}
|
||||
|
||||
function restoreWidth(navWidth)
|
||||
{
|
||||
var windowWidth = $(window).width() + "px";
|
||||
content.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
|
||||
sidenav.css({width:navWidth + "px"});
|
||||
}
|
||||
|
||||
function resizeHeight()
|
||||
{
|
||||
var headerHeight = header.outerHeight();
|
||||
var footerHeight = footer.outerHeight();
|
||||
var windowHeight = $(window).height() - headerHeight - footerHeight;
|
||||
content.css({height:windowHeight + "px"});
|
||||
navtree.css({height:windowHeight + "px"});
|
||||
sidenav.css({height:windowHeight + "px"});
|
||||
var width=$(window).width();
|
||||
if (width!=collapsedWidth) {
|
||||
if (width<desktop_vp && collapsedWidth>=desktop_vp) {
|
||||
if (!collapsed) {
|
||||
collapseExpand();
|
||||
}
|
||||
} else if (width>desktop_vp && collapsedWidth<desktop_vp) {
|
||||
if (collapsed) {
|
||||
collapseExpand();
|
||||
}
|
||||
}
|
||||
collapsedWidth=width;
|
||||
}
|
||||
(document.getElementById(location.hash.slice(1))||document.body).scrollIntoView();
|
||||
}
|
||||
|
||||
function collapseExpand()
|
||||
{
|
||||
if (sidenav.width()>0) {
|
||||
restoreWidth(0);
|
||||
collapsed=true;
|
||||
}
|
||||
else {
|
||||
var width = readCookie('width');
|
||||
if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); }
|
||||
collapsed=false;
|
||||
}
|
||||
}
|
||||
|
||||
header = $("#top");
|
||||
sidenav = $("#side-nav");
|
||||
content = $("#doc-content");
|
||||
navtree = $("#nav-tree");
|
||||
footer = $("#nav-path");
|
||||
$(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } });
|
||||
$(sidenav).resizable({ minWidth: 0 });
|
||||
$(window).resize(function() { resizeHeight(); });
|
||||
var device = navigator.userAgent.toLowerCase();
|
||||
var touch_device = device.match(/(iphone|ipod|ipad|android)/);
|
||||
if (touch_device) { /* wider split bar for touch only devices */
|
||||
$(sidenav).css({ paddingRight:'20px' });
|
||||
$('.ui-resizable-e').css({ width:'20px' });
|
||||
$('#nav-sync').css({ right:'34px' });
|
||||
barWidth=20;
|
||||
}
|
||||
var width = readCookie('width');
|
||||
if (width) { restoreWidth(width); } else { resizeWidth(); }
|
||||
resizeHeight();
|
||||
var url = location.href;
|
||||
var i=url.indexOf("#");
|
||||
if (i>=0) window.location.hash=url.substr(i);
|
||||
var _preventDefault = function(evt) { evt.preventDefault(); };
|
||||
$("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault);
|
||||
$(".ui-resizable-handle").dblclick(collapseExpand);
|
||||
$(window).on('load',resizeHeight);
|
||||
}
|
||||
/* @license-end */
|
Before Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 853 B |
Before Width: | Height: | Size: 845 B |
Before Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 184 B |
|
@ -1,263 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: thread.h File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('thread_8h.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">thread.h File Reference<div class="ingroups"><a class="el" href="group__thread.html">thread</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>POSIX threads library wrapper module.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <pthread.h></code><br />
|
||||
</div>
|
||||
<p><a href="thread_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Thread handling</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p>Variable type: <code>pthread_t</code></p>
|
||||
<p><a class="anchor" id="thread"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:gadca8bdcec91b8985370d904591d342b8"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#gadca8bdcec91b8985370d904591d342b8">thread_equal</a> (pthread_t t1, pthread_t t2)</td></tr>
|
||||
<tr class="memdesc:gadca8bdcec91b8985370d904591d342b8"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_equal</code> wrapper function. <a href="group__thread.html#gadca8bdcec91b8985370d904591d342b8">More...</a><br /></td></tr>
|
||||
<tr class="separator:gadca8bdcec91b8985370d904591d342b8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3a0f9920a321b54c41c098d3461d3889"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga3a0f9920a321b54c41c098d3461d3889">thread_create</a> (pthread_t *t, pthread_attr_t *attr, void *(*thread_main)(void *), void *arg)</td></tr>
|
||||
<tr class="memdesc:ga3a0f9920a321b54c41c098d3461d3889"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_create</code> wrapper function. <a href="group__thread.html#ga3a0f9920a321b54c41c098d3461d3889">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3a0f9920a321b54c41c098d3461d3889"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga606fdef53f997c231e0e1e9e54b350d4"><td class="memItemLeft" align="right" valign="top">pthread_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga606fdef53f997c231e0e1e9e54b350d4">thread_self</a> ()</td></tr>
|
||||
<tr class="memdesc:ga606fdef53f997c231e0e1e9e54b350d4"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_self</code> wrapper function. <a href="group__thread.html#ga606fdef53f997c231e0e1e9e54b350d4">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga606fdef53f997c231e0e1e9e54b350d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga952c63101c667d247f0923b609710c72"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga952c63101c667d247f0923b609710c72">thread_sched_yield</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga952c63101c667d247f0923b609710c72"><td class="mdescLeft"> </td><td class="mdescRight"><code>sched_yield</code> wrapper function. <a href="group__thread.html#ga952c63101c667d247f0923b609710c72">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga952c63101c667d247f0923b609710c72"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga19b16adf05364471bae2840aa564329a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga19b16adf05364471bae2840aa564329a">thread_exit</a> (void *retval)</td></tr>
|
||||
<tr class="memdesc:ga19b16adf05364471bae2840aa564329a"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_exit</code> wrapper function. <a href="group__thread.html#ga19b16adf05364471bae2840aa564329a">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga19b16adf05364471bae2840aa564329a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga86aa7989874009c886bea9d41700e25c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga86aa7989874009c886bea9d41700e25c">thread_detach</a> (pthread_t thread)</td></tr>
|
||||
<tr class="memdesc:ga86aa7989874009c886bea9d41700e25c"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_detach</code> wrapper function. <a href="group__thread.html#ga86aa7989874009c886bea9d41700e25c">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga86aa7989874009c886bea9d41700e25c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga2b2370a45c1518f777493526b2e4f46d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga2b2370a45c1518f777493526b2e4f46d">thread_join</a> (pthread_t t, void **result)</td></tr>
|
||||
<tr class="memdesc:ga2b2370a45c1518f777493526b2e4f46d"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_join</code> wrapper function. <a href="group__thread.html#ga2b2370a45c1518f777493526b2e4f46d">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga2b2370a45c1518f777493526b2e4f46d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Mutexes</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p>Variable type: <code>pthread_mutex_t</code></p>
|
||||
<p>Initialization of mutexes can be static or dynamic.</p>
|
||||
<p>In static initialization the following initialization macros are suggested:</p><ul>
|
||||
<li><code>PTHREAD_MUTEX_INITIALIZER</code> - standard initializer</li>
|
||||
<li><code>PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP</code> - initializer that ensures error checking</li>
|
||||
<li><code>PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP</code> - for recursive mutexes (note that recursive mutexes should be avoid)</li>
|
||||
</ul>
|
||||
<p>Dynamic initialization is done by <a class="el" href="group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6" title="pthread_mutex_init wrapper function.">mutex_init()</a> and <a class="el" href="group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01" title="pthread_mutex_destroy wrapper function.">mutex_destroy()</a>.</p>
|
||||
<p><a class="anchor" id="mutex"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:ga3f227a19d6a339ce0aeda15775e5e6e6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6">mutex_init</a> (pthread_mutex_t *pmtx, pthread_mutexattr_t *attr)</td></tr>
|
||||
<tr class="memdesc:ga3f227a19d6a339ce0aeda15775e5e6e6"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_mutex_init</code> wrapper function. <a href="group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3f227a19d6a339ce0aeda15775e5e6e6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5ebb836d0f83eac719f2cdd336497b01"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01">mutex_destroy</a> (pthread_mutex_t *pmtx)</td></tr>
|
||||
<tr class="memdesc:ga5ebb836d0f83eac719f2cdd336497b01"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_mutex_destroy</code> wrapper function. <a href="group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga5ebb836d0f83eac719f2cdd336497b01"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga87086ba0f13f6ddc479a6bc803a10c39"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga87086ba0f13f6ddc479a6bc803a10c39">mutex_lock</a> (pthread_mutex_t *pmtx)</td></tr>
|
||||
<tr class="memdesc:ga87086ba0f13f6ddc479a6bc803a10c39"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_mutex_lock</code> wrapper function. <a href="group__thread.html#ga87086ba0f13f6ddc479a6bc803a10c39">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga87086ba0f13f6ddc479a6bc803a10c39"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga8bd074884e1c92e88ca8ea0552d9a928"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga8bd074884e1c92e88ca8ea0552d9a928">mutex_trylock</a> (pthread_mutex_t *pmtx)</td></tr>
|
||||
<tr class="memdesc:ga8bd074884e1c92e88ca8ea0552d9a928"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_mutex_trylock</code> wrapper function. <a href="group__thread.html#ga8bd074884e1c92e88ca8ea0552d9a928">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga8bd074884e1c92e88ca8ea0552d9a928"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga95235231165ebda870afa10ba5fd6c41"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga95235231165ebda870afa10ba5fd6c41">mutex_unlock</a> (pthread_mutex_t *pmtx)</td></tr>
|
||||
<tr class="memdesc:ga95235231165ebda870afa10ba5fd6c41"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_mutex_unlock</code> wrapper function. <a href="group__thread.html#ga95235231165ebda870afa10ba5fd6c41">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga95235231165ebda870afa10ba5fd6c41"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Condition variables</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p>Variable type: <code>pthread_cond_t</code></p>
|
||||
<p>Initialization of condition variables can be static or dynamic.</p>
|
||||
<p>In static initialization the following initialization macros should be used:</p><ul>
|
||||
<li><code>PTHREAD_COND_INITIALIZER</code> - standard initializer</li>
|
||||
</ul>
|
||||
<p>Dynamic initialization is done by <a class="el" href="group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad" title="pthread_cond_init wrapper function.">cond_init()</a> and <a class="el" href="group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80" title="pthread_cond_destroy wrapper function.">cond_destroy()</a>.</p>
|
||||
<p><a class="anchor" id="cvar"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:ga31e5eaf158d118d0e4ef7fd47368eaad"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad">cond_init</a> (pthread_cond_t *pcvar, pthread_condattr_t *attr)</td></tr>
|
||||
<tr class="memdesc:ga31e5eaf158d118d0e4ef7fd47368eaad"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_cond_init</code> wrapper function. <a href="group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga31e5eaf158d118d0e4ef7fd47368eaad"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad663c43fbfbb4f660d48b07e110c8f80"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80">cond_destroy</a> (pthread_cond_t *pcvar)</td></tr>
|
||||
<tr class="memdesc:gad663c43fbfbb4f660d48b07e110c8f80"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_cond_destroy</code> wrapper function. <a href="group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad663c43fbfbb4f660d48b07e110c8f80"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1123643838d5174ccd41f52f4169e896"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga1123643838d5174ccd41f52f4169e896">cond_wait</a> (pthread_cond_t *pcvar, pthread_mutex_t *pmtx)</td></tr>
|
||||
<tr class="memdesc:ga1123643838d5174ccd41f52f4169e896"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_cond_wait</code> wrapper function. <a href="group__thread.html#ga1123643838d5174ccd41f52f4169e896">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1123643838d5174ccd41f52f4169e896"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga8cd2040836c30e4f0ea17abe4f66b8e2"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga8cd2040836c30e4f0ea17abe4f66b8e2">cond_timedwait</a> (pthread_cond_t *pcvar, pthread_mutex_t *pmtx, const struct timespec *abstime)</td></tr>
|
||||
<tr class="memdesc:ga8cd2040836c30e4f0ea17abe4f66b8e2"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_cond_timedwait</code> wrapper function. <a href="group__thread.html#ga8cd2040836c30e4f0ea17abe4f66b8e2">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga8cd2040836c30e4f0ea17abe4f66b8e2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga4b41089ba3cd8ad0a539b42bc8b95d6b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga4b41089ba3cd8ad0a539b42bc8b95d6b">cond_timedwait</a> (pthread_cond_t *pcvar, pthread_mutex_t *pmtx, long relative_time_us)</td></tr>
|
||||
<tr class="memdesc:ga4b41089ba3cd8ad0a539b42bc8b95d6b"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_cond_timedwait</code> wrapper function accepting relative time (in microseconds) instead of absolute time. <a href="group__thread.html#ga4b41089ba3cd8ad0a539b42bc8b95d6b">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga4b41089ba3cd8ad0a539b42bc8b95d6b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga9624688b577fb653af7a528848cc53d5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga9624688b577fb653af7a528848cc53d5">cond_signal</a> (pthread_cond_t *pcvar)</td></tr>
|
||||
<tr class="memdesc:ga9624688b577fb653af7a528848cc53d5"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_cond_signal</code> wrapper function. <a href="group__thread.html#ga9624688b577fb653af7a528848cc53d5">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga9624688b577fb653af7a528848cc53d5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6459039ab27da7237dda2bbc866eb2d0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga6459039ab27da7237dda2bbc866eb2d0">cond_broadcast</a> (pthread_cond_t *pcvar)</td></tr>
|
||||
<tr class="memdesc:ga6459039ab27da7237dda2bbc866eb2d0"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_cond_broadcast</code> wrapper function. <a href="group__thread.html#ga6459039ab27da7237dda2bbc866eb2d0">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga6459039ab27da7237dda2bbc866eb2d0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">One-time initialization</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p>Variable type: <code>pthread_once_t</code></p>
|
||||
<p>POSIX thread library support a mechanism that ensures a one-time execution of a function. It does it through <code>pthread_once_t</code> variables, and by passing a callback function (in C/C++ is simply a function pointer).</p>
|
||||
<dl class="section user"><dt>Example</dt><dd><pre class="fragment"> void once_init_routine(void) { ... }
|
||||
...
|
||||
pthread_once_t once_control = PTHREAD_ONCE_INIT;
|
||||
thread_once(&once_control, &once_init_routine); // one time execution over pthread_once_t
|
||||
// variable is guaranteed, regardless of the
|
||||
// number of threads that execute over that
|
||||
// variable.
|
||||
</pre></dd></dl>
|
||||
<p><a class="anchor" id="thread_once"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:gad0428e8a0809704f4b3d682f26d3ef1c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#gad0428e8a0809704f4b3d682f26d3ef1c">thread_once</a> (pthread_once_t *once_control, void(*init_routine)(void))</td></tr>
|
||||
<tr class="memdesc:gad0428e8a0809704f4b3d682f26d3ef1c"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_once</code> wrapper function. <a href="group__thread.html#gad0428e8a0809704f4b3d682f26d3ef1c">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad0428e8a0809704f4b3d682f26d3ef1c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Thread-specific data</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p>Variable type: <code>pthread_key_t</code></p>
|
||||
<p>Thread-specific data allows the definition of variable whose scope is limited to each thread. In practice, we will have a common variable, with a common access, but with different values for each thread.</p>
|
||||
<p><a class="anchor" id="thread_specific"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:ga7df1983f57dca40a86a55d215d13d42b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga7df1983f57dca40a86a55d215d13d42b">thread_key_create</a> (pthread_key_t *key, void(*destr_function)(void *))</td></tr>
|
||||
<tr class="memdesc:ga7df1983f57dca40a86a55d215d13d42b"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_key_create</code> wrapper function. <a href="group__thread.html#ga7df1983f57dca40a86a55d215d13d42b">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga7df1983f57dca40a86a55d215d13d42b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga65a50dfc97c087a28cb916e0f30f760e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga65a50dfc97c087a28cb916e0f30f760e">thread_key_delete</a> (pthread_key_t key)</td></tr>
|
||||
<tr class="memdesc:ga65a50dfc97c087a28cb916e0f30f760e"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_key_delete</code> wrapper function. <a href="group__thread.html#ga65a50dfc97c087a28cb916e0f30f760e">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga65a50dfc97c087a28cb916e0f30f760e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3008b033f2830e79179a882a2b74c8ba"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga3008b033f2830e79179a882a2b74c8ba">thread_setspecific</a> (pthread_key_t key, void *pointer)</td></tr>
|
||||
<tr class="memdesc:ga3008b033f2830e79179a882a2b74c8ba"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_setspecific</code> wrapper function. <a href="group__thread.html#ga3008b033f2830e79179a882a2b74c8ba">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3008b033f2830e79179a882a2b74c8ba"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0d207f1bb2e1d493b68a026b8650cb16"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga0d207f1bb2e1d493b68a026b8650cb16">thread_getspecific</a> (pthread_key_t key)</td></tr>
|
||||
<tr class="memdesc:ga0d207f1bb2e1d493b68a026b8650cb16"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_getspecific</code> wrapper function. <a href="group__thread.html#ga0d207f1bb2e1d493b68a026b8650cb16">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga0d207f1bb2e1d493b68a026b8650cb16"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Mutex attributes</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p>Variable type: <code>pthread_mutexattr_t</code></p>
|
||||
<p><a class="anchor" id="mutex_attr"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:ga9fb2733a01e8d668a2022005ea5dbebd"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga9fb2733a01e8d668a2022005ea5dbebd">mutexattr_init</a> (pthread_mutexattr_t *attr)</td></tr>
|
||||
<tr class="memdesc:ga9fb2733a01e8d668a2022005ea5dbebd"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_mutexattr_init</code> wrapper function. <a href="group__thread.html#ga9fb2733a01e8d668a2022005ea5dbebd">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga9fb2733a01e8d668a2022005ea5dbebd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga07bf0e49b1f2cb99d3a2955641c676d5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga07bf0e49b1f2cb99d3a2955641c676d5">mutexattr_destroy</a> (pthread_mutexattr_t *attr)</td></tr>
|
||||
<tr class="memdesc:ga07bf0e49b1f2cb99d3a2955641c676d5"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_mutexattr_destroy</code> wrapper function. <a href="group__thread.html#ga07bf0e49b1f2cb99d3a2955641c676d5">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga07bf0e49b1f2cb99d3a2955641c676d5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga601a6a9527d7d5ee2ca2870cddc4afc2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga601a6a9527d7d5ee2ca2870cddc4afc2">mutexattr_settype</a> (pthread_mutexattr_t *attr, int type)</td></tr>
|
||||
<tr class="memdesc:ga601a6a9527d7d5ee2ca2870cddc4afc2"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_mutexattr_settype</code> wrapper function. <a href="group__thread.html#ga601a6a9527d7d5ee2ca2870cddc4afc2">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga601a6a9527d7d5ee2ca2870cddc4afc2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gadf741e1818d53c5b7d71cd68e161b215"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#gadf741e1818d53c5b7d71cd68e161b215">mutexattr_gettype</a> (const pthread_mutexattr_t *attr, int *kind)</td></tr>
|
||||
<tr class="memdesc:gadf741e1818d53c5b7d71cd68e161b215"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_mutexattr_gettype</code> wrapper function. <a href="group__thread.html#gadf741e1818d53c5b7d71cd68e161b215">More...</a><br /></td></tr>
|
||||
<tr class="separator:gadf741e1818d53c5b7d71cd68e161b215"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Condition variables attributes</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p>Variable type: <code>pthread_condattr_t</code></p>
|
||||
<p><a class="anchor" id="cond_attr"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:gab8073c72be896ba9d711d887a5405a74"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#gab8073c72be896ba9d711d887a5405a74">condattr_init</a> (pthread_condattr_t *attr)</td></tr>
|
||||
<tr class="memdesc:gab8073c72be896ba9d711d887a5405a74"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_condattr_init</code> wrapper function. <a href="group__thread.html#gab8073c72be896ba9d711d887a5405a74">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab8073c72be896ba9d711d887a5405a74"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga4644f4989b30ccfb2e908017c43bd0d0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga4644f4989b30ccfb2e908017c43bd0d0">condattr_destroy</a> (pthread_condattr_t *attr)</td></tr>
|
||||
<tr class="memdesc:ga4644f4989b30ccfb2e908017c43bd0d0"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_condattr_destroy</code> wrapper function. <a href="group__thread.html#ga4644f4989b30ccfb2e908017c43bd0d0">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga4644f4989b30ccfb2e908017c43bd0d0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Thread attributes</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p>Variable type: <code>pthread_attr_t</code></p>
|
||||
<p><a class="anchor" id="thread_attr"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:gaaf2db7012069f0006e7ffaf257d8ccc6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#gaaf2db7012069f0006e7ffaf257d8ccc6">thread_attr_init</a> (pthread_attr_t *attr)</td></tr>
|
||||
<tr class="memdesc:gaaf2db7012069f0006e7ffaf257d8ccc6"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_attr_init</code> wrapper function. <a href="group__thread.html#gaaf2db7012069f0006e7ffaf257d8ccc6">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaaf2db7012069f0006e7ffaf257d8ccc6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf3a9c2c051deee01e21c75f0fa8b2e9c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#gaf3a9c2c051deee01e21c75f0fa8b2e9c">thread_attr_destroy</a> (pthread_attr_t *attr)</td></tr>
|
||||
<tr class="memdesc:gaf3a9c2c051deee01e21c75f0fa8b2e9c"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_attr_destroy</code> wrapper function. <a href="group__thread.html#gaf3a9c2c051deee01e21c75f0fa8b2e9c">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaf3a9c2c051deee01e21c75f0fa8b2e9c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gabc82fea1785fc82aeb2f43cdd77b9b0f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#gabc82fea1785fc82aeb2f43cdd77b9b0f">thread_attr_setdetachstate</a> (pthread_attr_t *attr, int detachstate)</td></tr>
|
||||
<tr class="memdesc:gabc82fea1785fc82aeb2f43cdd77b9b0f"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_attr_setdetachstate</code> wrapper function. <a href="group__thread.html#gabc82fea1785fc82aeb2f43cdd77b9b0f">More...</a><br /></td></tr>
|
||||
<tr class="separator:gabc82fea1785fc82aeb2f43cdd77b9b0f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaae83c8617612c1bb481fec2b382ac9c4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#gaae83c8617612c1bb481fec2b382ac9c4">thread_attr_getdetachstate</a> (const pthread_attr_t *attr, int *pdetachstate)</td></tr>
|
||||
<tr class="memdesc:gaae83c8617612c1bb481fec2b382ac9c4"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_attr_getdetachstate</code> wrapper function. <a href="group__thread.html#gaae83c8617612c1bb481fec2b382ac9c4">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaae83c8617612c1bb481fec2b382ac9c4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Cancellation</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="thread_cancellation"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:ga1b3cb53565eabe02a36e000e5244dfd1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga1b3cb53565eabe02a36e000e5244dfd1">thread_cancel</a> (pthread_t thread)</td></tr>
|
||||
<tr class="memdesc:ga1b3cb53565eabe02a36e000e5244dfd1"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_cancel</code> wrapper function. <a href="group__thread.html#ga1b3cb53565eabe02a36e000e5244dfd1">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1b3cb53565eabe02a36e000e5244dfd1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga98baffe08beec792f3428ae9ddad966e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga98baffe08beec792f3428ae9ddad966e">thread_setcancelstate</a> (int state, int *oldstate)</td></tr>
|
||||
<tr class="memdesc:ga98baffe08beec792f3428ae9ddad966e"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_setcancelstate</code> wrapper function. <a href="group__thread.html#ga98baffe08beec792f3428ae9ddad966e">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga98baffe08beec792f3428ae9ddad966e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab4ec114c7b59f8f4185bac648b256d0c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#gab4ec114c7b59f8f4185bac648b256d0c">thread_setcanceltype</a> (int type, int *oldtype)</td></tr>
|
||||
<tr class="memdesc:gab4ec114c7b59f8f4185bac648b256d0c"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_setcanceltype</code> wrapper function. <a href="group__thread.html#gab4ec114c7b59f8f4185bac648b256d0c">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab4ec114c7b59f8f4185bac648b256d0c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga81bdb13d62e16ad7cb3cbd263c9a5671"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__thread.html#ga81bdb13d62e16ad7cb3cbd263c9a5671">thread_testcancel</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga81bdb13d62e16ad7cb3cbd263c9a5671"><td class="mdescLeft"> </td><td class="mdescRight"><code>pthread_testcancel</code> wrapper function. <a href="group__thread.html#ga81bdb13d62e16ad7cb3cbd263c9a5671">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga81bdb13d62e16ad7cb3cbd263c9a5671"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>POSIX threads library wrapper module. </p>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>Removes defensive programming from native libraries </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="thread_8h.html">thread.h</a></li>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,41 +0,0 @@
|
|||
var thread_8h =
|
||||
[
|
||||
[ "thread_equal", "group__thread.html#gadca8bdcec91b8985370d904591d342b8", null ],
|
||||
[ "thread_create", "group__thread.html#ga3a0f9920a321b54c41c098d3461d3889", null ],
|
||||
[ "thread_self", "group__thread.html#ga606fdef53f997c231e0e1e9e54b350d4", null ],
|
||||
[ "thread_sched_yield", "group__thread.html#ga952c63101c667d247f0923b609710c72", null ],
|
||||
[ "thread_exit", "group__thread.html#ga19b16adf05364471bae2840aa564329a", null ],
|
||||
[ "thread_detach", "group__thread.html#ga86aa7989874009c886bea9d41700e25c", null ],
|
||||
[ "thread_join", "group__thread.html#ga2b2370a45c1518f777493526b2e4f46d", null ],
|
||||
[ "mutex_init", "group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6", null ],
|
||||
[ "mutex_destroy", "group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01", null ],
|
||||
[ "mutex_lock", "group__thread.html#ga87086ba0f13f6ddc479a6bc803a10c39", null ],
|
||||
[ "mutex_trylock", "group__thread.html#ga8bd074884e1c92e88ca8ea0552d9a928", null ],
|
||||
[ "mutex_unlock", "group__thread.html#ga95235231165ebda870afa10ba5fd6c41", null ],
|
||||
[ "cond_init", "group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad", null ],
|
||||
[ "cond_destroy", "group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80", null ],
|
||||
[ "cond_wait", "group__thread.html#ga1123643838d5174ccd41f52f4169e896", null ],
|
||||
[ "cond_timedwait", "group__thread.html#ga8cd2040836c30e4f0ea17abe4f66b8e2", null ],
|
||||
[ "cond_timedwait", "group__thread.html#ga4b41089ba3cd8ad0a539b42bc8b95d6b", null ],
|
||||
[ "cond_signal", "group__thread.html#ga9624688b577fb653af7a528848cc53d5", null ],
|
||||
[ "cond_broadcast", "group__thread.html#ga6459039ab27da7237dda2bbc866eb2d0", null ],
|
||||
[ "thread_once", "group__thread.html#gad0428e8a0809704f4b3d682f26d3ef1c", null ],
|
||||
[ "thread_key_create", "group__thread.html#ga7df1983f57dca40a86a55d215d13d42b", null ],
|
||||
[ "thread_key_delete", "group__thread.html#ga65a50dfc97c087a28cb916e0f30f760e", null ],
|
||||
[ "thread_setspecific", "group__thread.html#ga3008b033f2830e79179a882a2b74c8ba", null ],
|
||||
[ "thread_getspecific", "group__thread.html#ga0d207f1bb2e1d493b68a026b8650cb16", null ],
|
||||
[ "mutexattr_init", "group__thread.html#ga9fb2733a01e8d668a2022005ea5dbebd", null ],
|
||||
[ "mutexattr_destroy", "group__thread.html#ga07bf0e49b1f2cb99d3a2955641c676d5", null ],
|
||||
[ "mutexattr_settype", "group__thread.html#ga601a6a9527d7d5ee2ca2870cddc4afc2", null ],
|
||||
[ "mutexattr_gettype", "group__thread.html#gadf741e1818d53c5b7d71cd68e161b215", null ],
|
||||
[ "condattr_init", "group__thread.html#gab8073c72be896ba9d711d887a5405a74", null ],
|
||||
[ "condattr_destroy", "group__thread.html#ga4644f4989b30ccfb2e908017c43bd0d0", null ],
|
||||
[ "thread_attr_init", "group__thread.html#gaaf2db7012069f0006e7ffaf257d8ccc6", null ],
|
||||
[ "thread_attr_destroy", "group__thread.html#gaf3a9c2c051deee01e21c75f0fa8b2e9c", null ],
|
||||
[ "thread_attr_setdetachstate", "group__thread.html#gabc82fea1785fc82aeb2f43cdd77b9b0f", null ],
|
||||
[ "thread_attr_getdetachstate", "group__thread.html#gaae83c8617612c1bb481fec2b382ac9c4", null ],
|
||||
[ "thread_cancel", "group__thread.html#ga1b3cb53565eabe02a36e000e5244dfd1", null ],
|
||||
[ "thread_setcancelstate", "group__thread.html#ga98baffe08beec792f3428ae9ddad966e", null ],
|
||||
[ "thread_setcanceltype", "group__thread.html#gab4ec114c7b59f8f4185bac648b256d0c", null ],
|
||||
[ "thread_testcancel", "group__thread.html#ga81bdb13d62e16ad7cb3cbd263c9a5671", null ]
|
||||
];
|
|
@ -1,207 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: thread.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('thread_8h_source.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">thread.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="thread_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#ifndef THREAD_H</span></div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#define THREAD_H</span></div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  </div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <pthread.h></span></div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment">//#define EXCEPTION_POLICY</span></div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment">//#define EXIT_POLICY // DEFAULT</span></div>
|
||||
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  </div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="keywordtype">int</span> <a class="code" href="group__thread.html#gadca8bdcec91b8985370d904591d342b8">thread_equal</a>(pthread_t t1, pthread_t t2);</div>
|
||||
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  </div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga3a0f9920a321b54c41c098d3461d3889">thread_create</a>(pthread_t* t, pthread_attr_t* attr, <span class="keywordtype">void</span> *(*thread_main)(<span class="keywordtype">void</span>*), <span class="keywordtype">void</span>* arg);</div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  </div>
|
||||
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> pthread_t <a class="code" href="group__thread.html#ga606fdef53f997c231e0e1e9e54b350d4">thread_self</a>();</div>
|
||||
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  </div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga952c63101c667d247f0923b609710c72">thread_sched_yield</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  </div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga19b16adf05364471bae2840aa564329a">thread_exit</a>(<span class="keywordtype">void</span> *retval);</div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  </div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga86aa7989874009c886bea9d41700e25c">thread_detach</a>(pthread_t thread);</div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  </div>
|
||||
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga2b2370a45c1518f777493526b2e4f46d">thread_join</a>(pthread_t t, <span class="keywordtype">void</span>** result);</div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  </div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6">mutex_init</a>(pthread_mutex_t* pmtx, pthread_mutexattr_t* attr);</div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  </div>
|
||||
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01">mutex_destroy</a>(pthread_mutex_t* pmtx);</div>
|
||||
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  </div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga87086ba0f13f6ddc479a6bc803a10c39">mutex_lock</a>(pthread_mutex_t* pmtx);</div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  </div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span> <span class="keywordtype">int</span> <a class="code" href="group__thread.html#ga8bd074884e1c92e88ca8ea0552d9a928">mutex_trylock</a>(pthread_mutex_t* pmtx);</div>
|
||||
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  </div>
|
||||
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga95235231165ebda870afa10ba5fd6c41">mutex_unlock</a>(pthread_mutex_t* pmtx);</div>
|
||||
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  </div>
|
||||
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad">cond_init</a>(pthread_cond_t* pcvar, pthread_condattr_t* attr);</div>
|
||||
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  </div>
|
||||
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80">cond_destroy</a>(pthread_cond_t* pcvar);</div>
|
||||
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  </div>
|
||||
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga1123643838d5174ccd41f52f4169e896">cond_wait</a>(pthread_cond_t* pcvar, pthread_mutex_t* pmtx);</div>
|
||||
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  </div>
|
||||
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span> <span class="keywordtype">int</span> <a class="code" href="group__thread.html#ga8cd2040836c30e4f0ea17abe4f66b8e2">cond_timedwait</a>(pthread_cond_t* pcvar, pthread_mutex_t* pmtx, <span class="keyword">const</span> <span class="keyword">struct</span> timespec *abstime);</div>
|
||||
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  </div>
|
||||
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span> <span class="keywordtype">int</span> <a class="code" href="group__thread.html#ga8cd2040836c30e4f0ea17abe4f66b8e2">cond_timedwait</a>(pthread_cond_t* pcvar, pthread_mutex_t* pmtx, <span class="keywordtype">long</span> relative_time_us);</div>
|
||||
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  </div>
|
||||
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga9624688b577fb653af7a528848cc53d5">cond_signal</a>(pthread_cond_t* pcvar);</div>
|
||||
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  </div>
|
||||
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga6459039ab27da7237dda2bbc866eb2d0">cond_broadcast</a>(pthread_cond_t* pcvar);</div>
|
||||
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  </div>
|
||||
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#gad0428e8a0809704f4b3d682f26d3ef1c">thread_once</a>(pthread_once_t *once_control, <span class="keywordtype">void</span> (*init_routine) (<span class="keywordtype">void</span>));</div>
|
||||
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  </div>
|
||||
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga7df1983f57dca40a86a55d215d13d42b">thread_key_create</a>(pthread_key_t *key, <span class="keywordtype">void</span> (*destr_function) (<span class="keywordtype">void</span> *));</div>
|
||||
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  </div>
|
||||
<div class="line"><a name="l00404"></a><span class="lineno"> 404</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga65a50dfc97c087a28cb916e0f30f760e">thread_key_delete</a>(pthread_key_t key);</div>
|
||||
<div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  </div>
|
||||
<div class="line"><a name="l00417"></a><span class="lineno"> 417</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga3008b033f2830e79179a882a2b74c8ba">thread_setspecific</a>(pthread_key_t key, <span class="keywordtype">void</span>* pointer);</div>
|
||||
<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  </div>
|
||||
<div class="line"><a name="l00430"></a><span class="lineno"> 430</span> <span class="keywordtype">void</span>* <a class="code" href="group__thread.html#ga0d207f1bb2e1d493b68a026b8650cb16">thread_getspecific</a>(pthread_key_t key);</div>
|
||||
<div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  </div>
|
||||
<div class="line"><a name="l00455"></a><span class="lineno"> 455</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga9fb2733a01e8d668a2022005ea5dbebd">mutexattr_init</a>(pthread_mutexattr_t *attr);</div>
|
||||
<div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  </div>
|
||||
<div class="line"><a name="l00468"></a><span class="lineno"> 468</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga07bf0e49b1f2cb99d3a2955641c676d5">mutexattr_destroy</a>(pthread_mutexattr_t *attr);</div>
|
||||
<div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  </div>
|
||||
<div class="line"><a name="l00481"></a><span class="lineno"> 481</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga601a6a9527d7d5ee2ca2870cddc4afc2">mutexattr_settype</a>(pthread_mutexattr_t *attr, <span class="keywordtype">int</span> type);</div>
|
||||
<div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  </div>
|
||||
<div class="line"><a name="l00495"></a><span class="lineno"> 495</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#gadf741e1818d53c5b7d71cd68e161b215">mutexattr_gettype</a>(<span class="keyword">const</span> pthread_mutexattr_t *attr, <span class="keywordtype">int</span> *kind);</div>
|
||||
<div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  </div>
|
||||
<div class="line"><a name="l00520"></a><span class="lineno"> 520</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#gab8073c72be896ba9d711d887a5405a74">condattr_init</a>(pthread_condattr_t *attr);</div>
|
||||
<div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  </div>
|
||||
<div class="line"><a name="l00533"></a><span class="lineno"> 533</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga4644f4989b30ccfb2e908017c43bd0d0">condattr_destroy</a>(pthread_condattr_t *attr);</div>
|
||||
<div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  </div>
|
||||
<div class="line"><a name="l00558"></a><span class="lineno"> 558</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#gaaf2db7012069f0006e7ffaf257d8ccc6">thread_attr_init</a>(pthread_attr_t *attr);</div>
|
||||
<div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  </div>
|
||||
<div class="line"><a name="l00571"></a><span class="lineno"> 571</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#gaf3a9c2c051deee01e21c75f0fa8b2e9c">thread_attr_destroy</a>(pthread_attr_t *attr);</div>
|
||||
<div class="line"><a name="l00572"></a><span class="lineno"> 572</span>  </div>
|
||||
<div class="line"><a name="l00585"></a><span class="lineno"> 585</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#gabc82fea1785fc82aeb2f43cdd77b9b0f">thread_attr_setdetachstate</a>(pthread_attr_t *attr, <span class="keywordtype">int</span> detachstate);</div>
|
||||
<div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  </div>
|
||||
<div class="line"><a name="l00599"></a><span class="lineno"> 599</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#gaae83c8617612c1bb481fec2b382ac9c4">thread_attr_getdetachstate</a>(<span class="keyword">const</span> pthread_attr_t *attr, <span class="keywordtype">int</span> *pdetachstate);</div>
|
||||
<div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  </div>
|
||||
<div class="line"><a name="l00616"></a><span class="lineno"> 616</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga1b3cb53565eabe02a36e000e5244dfd1">thread_cancel</a>(pthread_t thread);</div>
|
||||
<div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  </div>
|
||||
<div class="line"><a name="l00630"></a><span class="lineno"> 630</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga98baffe08beec792f3428ae9ddad966e">thread_setcancelstate</a>(<span class="keywordtype">int</span> state, <span class="keywordtype">int</span> *oldstate);</div>
|
||||
<div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  </div>
|
||||
<div class="line"><a name="l00644"></a><span class="lineno"> 644</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#gab4ec114c7b59f8f4185bac648b256d0c">thread_setcanceltype</a>(<span class="keywordtype">int</span> type, <span class="keywordtype">int</span> *oldtype);</div>
|
||||
<div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  </div>
|
||||
<div class="line"><a name="l00653"></a><span class="lineno"> 653</span> <span class="keywordtype">void</span> <a class="code" href="group__thread.html#ga81bdb13d62e16ad7cb3cbd263c9a5671">thread_testcancel</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a name="l00654"></a><span class="lineno"> 654</span>  </div>
|
||||
<div class="line"><a name="l00655"></a><span class="lineno"> 655</span>  </div>
|
||||
<div class="line"><a name="l00658"></a><span class="lineno"> 658</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00659"></a><span class="lineno"> 659</span>  </div>
|
||||
<div class="line"><a name="l00660"></a><span class="lineno"> 660</span> <span class="comment">/* ************************************************** */</span></div>
|
||||
<div class="line"><a name="l00664"></a><span class="lineno"> 664</span> <span class="comment">/* ************************************************** */</span></div>
|
||||
<div class="line"><a name="l00665"></a><span class="lineno"> 665</span>  </div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="agroup__thread_html_ga31e5eaf158d118d0e4ef7fd47368eaad"><div class="ttname"><a href="group__thread.html#ga31e5eaf158d118d0e4ef7fd47368eaad">cond_init</a></div><div class="ttdeci">void cond_init(pthread_cond_t *pcvar, pthread_condattr_t *attr)</div><div class="ttdoc">pthread_cond_init wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga3008b033f2830e79179a882a2b74c8ba"><div class="ttname"><a href="group__thread.html#ga3008b033f2830e79179a882a2b74c8ba">thread_setspecific</a></div><div class="ttdeci">void thread_setspecific(pthread_key_t key, void *pointer)</div><div class="ttdoc">pthread_setspecific wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_gad663c43fbfbb4f660d48b07e110c8f80"><div class="ttname"><a href="group__thread.html#gad663c43fbfbb4f660d48b07e110c8f80">cond_destroy</a></div><div class="ttdeci">void cond_destroy(pthread_cond_t *pcvar)</div><div class="ttdoc">pthread_cond_destroy wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga7df1983f57dca40a86a55d215d13d42b"><div class="ttname"><a href="group__thread.html#ga7df1983f57dca40a86a55d215d13d42b">thread_key_create</a></div><div class="ttdeci">void thread_key_create(pthread_key_t *key, void(*destr_function)(void *))</div><div class="ttdoc">pthread_key_create wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga19b16adf05364471bae2840aa564329a"><div class="ttname"><a href="group__thread.html#ga19b16adf05364471bae2840aa564329a">thread_exit</a></div><div class="ttdeci">void thread_exit(void *retval)</div><div class="ttdoc">pthread_exit wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga07bf0e49b1f2cb99d3a2955641c676d5"><div class="ttname"><a href="group__thread.html#ga07bf0e49b1f2cb99d3a2955641c676d5">mutexattr_destroy</a></div><div class="ttdeci">void mutexattr_destroy(pthread_mutexattr_t *attr)</div><div class="ttdoc">pthread_mutexattr_destroy wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga98baffe08beec792f3428ae9ddad966e"><div class="ttname"><a href="group__thread.html#ga98baffe08beec792f3428ae9ddad966e">thread_setcancelstate</a></div><div class="ttdeci">void thread_setcancelstate(int state, int *oldstate)</div><div class="ttdoc">pthread_setcancelstate wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_gaae83c8617612c1bb481fec2b382ac9c4"><div class="ttname"><a href="group__thread.html#gaae83c8617612c1bb481fec2b382ac9c4">thread_attr_getdetachstate</a></div><div class="ttdeci">void thread_attr_getdetachstate(const pthread_attr_t *attr, int *pdetachstate)</div><div class="ttdoc">pthread_attr_getdetachstate wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga65a50dfc97c087a28cb916e0f30f760e"><div class="ttname"><a href="group__thread.html#ga65a50dfc97c087a28cb916e0f30f760e">thread_key_delete</a></div><div class="ttdeci">void thread_key_delete(pthread_key_t key)</div><div class="ttdoc">pthread_key_delete wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga81bdb13d62e16ad7cb3cbd263c9a5671"><div class="ttname"><a href="group__thread.html#ga81bdb13d62e16ad7cb3cbd263c9a5671">thread_testcancel</a></div><div class="ttdeci">void thread_testcancel(void)</div><div class="ttdoc">pthread_testcancel wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_gab8073c72be896ba9d711d887a5405a74"><div class="ttname"><a href="group__thread.html#gab8073c72be896ba9d711d887a5405a74">condattr_init</a></div><div class="ttdeci">void condattr_init(pthread_condattr_t *attr)</div><div class="ttdoc">pthread_condattr_init wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga2b2370a45c1518f777493526b2e4f46d"><div class="ttname"><a href="group__thread.html#ga2b2370a45c1518f777493526b2e4f46d">thread_join</a></div><div class="ttdeci">void thread_join(pthread_t t, void **result)</div><div class="ttdoc">pthread_join wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga4644f4989b30ccfb2e908017c43bd0d0"><div class="ttname"><a href="group__thread.html#ga4644f4989b30ccfb2e908017c43bd0d0">condattr_destroy</a></div><div class="ttdeci">void condattr_destroy(pthread_condattr_t *attr)</div><div class="ttdoc">pthread_condattr_destroy wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga9624688b577fb653af7a528848cc53d5"><div class="ttname"><a href="group__thread.html#ga9624688b577fb653af7a528848cc53d5">cond_signal</a></div><div class="ttdeci">void cond_signal(pthread_cond_t *pcvar)</div><div class="ttdoc">pthread_cond_signal wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_gaaf2db7012069f0006e7ffaf257d8ccc6"><div class="ttname"><a href="group__thread.html#gaaf2db7012069f0006e7ffaf257d8ccc6">thread_attr_init</a></div><div class="ttdeci">void thread_attr_init(pthread_attr_t *attr)</div><div class="ttdoc">pthread_attr_init wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga3f227a19d6a339ce0aeda15775e5e6e6"><div class="ttname"><a href="group__thread.html#ga3f227a19d6a339ce0aeda15775e5e6e6">mutex_init</a></div><div class="ttdeci">void mutex_init(pthread_mutex_t *pmtx, pthread_mutexattr_t *attr)</div><div class="ttdoc">pthread_mutex_init wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga1123643838d5174ccd41f52f4169e896"><div class="ttname"><a href="group__thread.html#ga1123643838d5174ccd41f52f4169e896">cond_wait</a></div><div class="ttdeci">void cond_wait(pthread_cond_t *pcvar, pthread_mutex_t *pmtx)</div><div class="ttdoc">pthread_cond_wait wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga86aa7989874009c886bea9d41700e25c"><div class="ttname"><a href="group__thread.html#ga86aa7989874009c886bea9d41700e25c">thread_detach</a></div><div class="ttdeci">void thread_detach(pthread_t thread)</div><div class="ttdoc">pthread_detach wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga6459039ab27da7237dda2bbc866eb2d0"><div class="ttname"><a href="group__thread.html#ga6459039ab27da7237dda2bbc866eb2d0">cond_broadcast</a></div><div class="ttdeci">void cond_broadcast(pthread_cond_t *pcvar)</div><div class="ttdoc">pthread_cond_broadcast wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga9fb2733a01e8d668a2022005ea5dbebd"><div class="ttname"><a href="group__thread.html#ga9fb2733a01e8d668a2022005ea5dbebd">mutexattr_init</a></div><div class="ttdeci">void mutexattr_init(pthread_mutexattr_t *attr)</div><div class="ttdoc">pthread_mutexattr_init wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_gadf741e1818d53c5b7d71cd68e161b215"><div class="ttname"><a href="group__thread.html#gadf741e1818d53c5b7d71cd68e161b215">mutexattr_gettype</a></div><div class="ttdeci">void mutexattr_gettype(const pthread_mutexattr_t *attr, int *kind)</div><div class="ttdoc">pthread_mutexattr_gettype wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_gaf3a9c2c051deee01e21c75f0fa8b2e9c"><div class="ttname"><a href="group__thread.html#gaf3a9c2c051deee01e21c75f0fa8b2e9c">thread_attr_destroy</a></div><div class="ttdeci">void thread_attr_destroy(pthread_attr_t *attr)</div><div class="ttdoc">pthread_attr_destroy wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga0d207f1bb2e1d493b68a026b8650cb16"><div class="ttname"><a href="group__thread.html#ga0d207f1bb2e1d493b68a026b8650cb16">thread_getspecific</a></div><div class="ttdeci">void * thread_getspecific(pthread_key_t key)</div><div class="ttdoc">pthread_getspecific wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga5ebb836d0f83eac719f2cdd336497b01"><div class="ttname"><a href="group__thread.html#ga5ebb836d0f83eac719f2cdd336497b01">mutex_destroy</a></div><div class="ttdeci">void mutex_destroy(pthread_mutex_t *pmtx)</div><div class="ttdoc">pthread_mutex_destroy wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_gad0428e8a0809704f4b3d682f26d3ef1c"><div class="ttname"><a href="group__thread.html#gad0428e8a0809704f4b3d682f26d3ef1c">thread_once</a></div><div class="ttdeci">void thread_once(pthread_once_t *once_control, void(*init_routine)(void))</div><div class="ttdoc">pthread_once wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga3a0f9920a321b54c41c098d3461d3889"><div class="ttname"><a href="group__thread.html#ga3a0f9920a321b54c41c098d3461d3889">thread_create</a></div><div class="ttdeci">void thread_create(pthread_t *t, pthread_attr_t *attr, void *(*thread_main)(void *), void *arg)</div><div class="ttdoc">pthread_create wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_gab4ec114c7b59f8f4185bac648b256d0c"><div class="ttname"><a href="group__thread.html#gab4ec114c7b59f8f4185bac648b256d0c">thread_setcanceltype</a></div><div class="ttdeci">void thread_setcanceltype(int type, int *oldtype)</div><div class="ttdoc">pthread_setcanceltype wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga952c63101c667d247f0923b609710c72"><div class="ttname"><a href="group__thread.html#ga952c63101c667d247f0923b609710c72">thread_sched_yield</a></div><div class="ttdeci">void thread_sched_yield(void)</div><div class="ttdoc">sched_yield wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga601a6a9527d7d5ee2ca2870cddc4afc2"><div class="ttname"><a href="group__thread.html#ga601a6a9527d7d5ee2ca2870cddc4afc2">mutexattr_settype</a></div><div class="ttdeci">void mutexattr_settype(pthread_mutexattr_t *attr, int type)</div><div class="ttdoc">pthread_mutexattr_settype wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_gadca8bdcec91b8985370d904591d342b8"><div class="ttname"><a href="group__thread.html#gadca8bdcec91b8985370d904591d342b8">thread_equal</a></div><div class="ttdeci">int thread_equal(pthread_t t1, pthread_t t2)</div><div class="ttdoc">pthread_equal wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga1b3cb53565eabe02a36e000e5244dfd1"><div class="ttname"><a href="group__thread.html#ga1b3cb53565eabe02a36e000e5244dfd1">thread_cancel</a></div><div class="ttdeci">void thread_cancel(pthread_t thread)</div><div class="ttdoc">pthread_cancel wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga606fdef53f997c231e0e1e9e54b350d4"><div class="ttname"><a href="group__thread.html#ga606fdef53f997c231e0e1e9e54b350d4">thread_self</a></div><div class="ttdeci">pthread_t thread_self()</div><div class="ttdoc">pthread_self wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_gabc82fea1785fc82aeb2f43cdd77b9b0f"><div class="ttname"><a href="group__thread.html#gabc82fea1785fc82aeb2f43cdd77b9b0f">thread_attr_setdetachstate</a></div><div class="ttdeci">void thread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)</div><div class="ttdoc">pthread_attr_setdetachstate wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga87086ba0f13f6ddc479a6bc803a10c39"><div class="ttname"><a href="group__thread.html#ga87086ba0f13f6ddc479a6bc803a10c39">mutex_lock</a></div><div class="ttdeci">void mutex_lock(pthread_mutex_t *pmtx)</div><div class="ttdoc">pthread_mutex_lock wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga8cd2040836c30e4f0ea17abe4f66b8e2"><div class="ttname"><a href="group__thread.html#ga8cd2040836c30e4f0ea17abe4f66b8e2">cond_timedwait</a></div><div class="ttdeci">int cond_timedwait(pthread_cond_t *pcvar, pthread_mutex_t *pmtx, const struct timespec *abstime)</div><div class="ttdoc">pthread_cond_timedwait wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga95235231165ebda870afa10ba5fd6c41"><div class="ttname"><a href="group__thread.html#ga95235231165ebda870afa10ba5fd6c41">mutex_unlock</a></div><div class="ttdeci">void mutex_unlock(pthread_mutex_t *pmtx)</div><div class="ttdoc">pthread_mutex_unlock wrapper function.</div></div>
|
||||
<div class="ttc" id="agroup__thread_html_ga8bd074884e1c92e88ca8ea0552d9a928"><div class="ttname"><a href="group__thread.html#ga8bd074884e1c92e88ca8ea0552d9a928">mutex_trylock</a></div><div class="ttdeci">int mutex_trylock(pthread_mutex_t *pmtx)</div><div class="ttdoc">pthread_mutex_trylock wrapper function.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="thread_8h.html">thread.h</a></li>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,208 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: utils.h File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('utils_8h.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">utils.h File Reference<div class="ingroups"><a class="el" href="group__utils.html">utils</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Useful common functions and macros.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <stdio.h></code><br />
|
||||
<code>#include <string.h></code><br />
|
||||
<code>#include <errno.h></code><br />
|
||||
<code>#include "<a class="el" href="dbc_8h_source.html">dbc.h</a>"</code><br />
|
||||
</div>
|
||||
<p><a href="utils_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:ga3c545b669dff7d67e5ed3c58233ccf4b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga3c545b669dff7d67e5ed3c58233ccf4b">int2str</a>(num)</td></tr>
|
||||
<tr class="memdesc:ga3c545b669dff7d67e5ed3c58233ccf4b"><td class="mdescLeft"> </td><td class="mdescRight">Converts an <code>int</code> value to a stack allocated string. <a href="group__utils.html#ga3c545b669dff7d67e5ed3c58233ccf4b">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3c545b669dff7d67e5ed3c58233ccf4b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga858ece77e79fb78d3db0f1851bf7fe09"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga858ece77e79fb78d3db0f1851bf7fe09">int2nstr</a>(num, len)</td></tr>
|
||||
<tr class="memdesc:ga858ece77e79fb78d3db0f1851bf7fe09"><td class="mdescLeft"> </td><td class="mdescRight">Converts an <code>int</code> value to a stack allocated string. <a href="group__utils.html#ga858ece77e79fb78d3db0f1851bf7fe09">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga858ece77e79fb78d3db0f1851bf7fe09"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga69373a612a7b4d264371f727217f9954"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga69373a612a7b4d264371f727217f9954">long2str</a>(num)</td></tr>
|
||||
<tr class="memdesc:ga69373a612a7b4d264371f727217f9954"><td class="mdescLeft"> </td><td class="mdescRight">Converts an <code>long</code> value to a stack allocated string. <a href="group__utils.html#ga69373a612a7b4d264371f727217f9954">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga69373a612a7b4d264371f727217f9954"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga50cea1f8154c7c7d2abd68f1ddb33086"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga50cea1f8154c7c7d2abd68f1ddb33086">long2nstr</a>(num, len)</td></tr>
|
||||
<tr class="memdesc:ga50cea1f8154c7c7d2abd68f1ddb33086"><td class="mdescLeft"> </td><td class="mdescRight">Converts an <code>long</code> value to a stack allocated string. <a href="group__utils.html#ga50cea1f8154c7c7d2abd68f1ddb33086">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga50cea1f8154c7c7d2abd68f1ddb33086"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga59cd66180162d107cf86a51c21d7e6f5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga59cd66180162d107cf86a51c21d7e6f5">perc2str</a>(percentage)</td></tr>
|
||||
<tr class="memdesc:ga59cd66180162d107cf86a51c21d7e6f5"><td class="mdescLeft"> </td><td class="mdescRight">Converts an <code>int</code> percentage to a stack allocated string. <a href="group__utils.html#ga59cd66180162d107cf86a51c21d7e6f5">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga59cd66180162d107cf86a51c21d7e6f5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7bffda236a079c26302722c7d155f7a5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga7bffda236a079c26302722c7d155f7a5">length_vargs_string_list</a>(first)</td></tr>
|
||||
<tr class="memdesc:ga7bffda236a079c26302722c7d155f7a5"><td class="mdescLeft"> </td><td class="mdescRight">Determines the length of all strings passed as a NULL terminated variable list of arguments (vargs). <a href="group__utils.html#ga7bffda236a079c26302722c7d155f7a5">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga7bffda236a079c26302722c7d155f7a5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gadfa0375f8178c737deae23ffa8d152f4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gadfa0375f8178c737deae23ffa8d152f4">not_null</a>(pnt)</td></tr>
|
||||
<tr class="memdesc:gadfa0375f8178c737deae23ffa8d152f4"><td class="mdescLeft"> </td><td class="mdescRight">Checks if address is not <code>NULL</code>, before its application. <a href="group__utils.html#gadfa0375f8178c737deae23ffa8d152f4">More...</a><br /></td></tr>
|
||||
<tr class="separator:gadfa0375f8178c737deae23ffa8d152f4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">String concatenation in stack memory</div></td></tr>
|
||||
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="concat"></a></p>
|
||||
</div></td></tr>
|
||||
<tr class="memitem:ga22347cbf977a0300726f06257edd79d6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga22347cbf977a0300726f06257edd79d6">concat_2str</a>(str1, str2)</td></tr>
|
||||
<tr class="memdesc:ga22347cbf977a0300726f06257edd79d6"><td class="mdescLeft"> </td><td class="mdescRight">Concatenates two strings in the stack memory (thus it cannot be implemented in a function). <a href="group__utils.html#ga22347cbf977a0300726f06257edd79d6">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga22347cbf977a0300726f06257edd79d6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga123e40006d54612c48c2660432dfeb23"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga123e40006d54612c48c2660432dfeb23">concat_3str</a>(str1, str2, str3)</td></tr>
|
||||
<tr class="memdesc:ga123e40006d54612c48c2660432dfeb23"><td class="mdescLeft"> </td><td class="mdescRight">Concatenates three strings in the stack memory (thus it cannot be implemented in a function). <a href="group__utils.html#ga123e40006d54612c48c2660432dfeb23">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga123e40006d54612c48c2660432dfeb23"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga69037999e65cdb42d39988e0fec48af4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga69037999e65cdb42d39988e0fec48af4">concat_4str</a>(str1, str2, str3, str4)</td></tr>
|
||||
<tr class="memdesc:ga69037999e65cdb42d39988e0fec48af4"><td class="mdescLeft"> </td><td class="mdescRight">Concatenates four strings in the stack memory (thus it cannot be implemented in a function). <a href="group__utils.html#ga69037999e65cdb42d39988e0fec48af4">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga69037999e65cdb42d39988e0fec48af4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga580d1897bc7a8cef16d5a16a2373b876"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga580d1897bc7a8cef16d5a16a2373b876">concat_5str</a>(str1, str2, str3, str4, str5)</td></tr>
|
||||
<tr class="memdesc:ga580d1897bc7a8cef16d5a16a2373b876"><td class="mdescLeft"> </td><td class="mdescRight">Concatenates five strings in the stack memory (thus it cannot be implemented in a function). <a href="group__utils.html#ga580d1897bc7a8cef16d5a16a2373b876">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga580d1897bc7a8cef16d5a16a2373b876"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga34f8c2fcee597a99c5f4c66f2119bca9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga34f8c2fcee597a99c5f4c66f2119bca9">concat_6str</a>(str1, str2, str3, str4, str5, str6)</td></tr>
|
||||
<tr class="memdesc:ga34f8c2fcee597a99c5f4c66f2119bca9"><td class="mdescLeft"> </td><td class="mdescRight">Concatenates six strings in the stack memory (thus it cannot be implemented in a function). <a href="group__utils.html#ga34f8c2fcee597a99c5f4c66f2119bca9">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga34f8c2fcee597a99c5f4c66f2119bca9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga01d1ea65eb6780d91705484dd46833bf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga01d1ea65eb6780d91705484dd46833bf">concat_7str</a>(str1, str2, str3, str4, str5, str6, str7)</td></tr>
|
||||
<tr class="memdesc:ga01d1ea65eb6780d91705484dd46833bf"><td class="mdescLeft"> </td><td class="mdescRight">Concatenates seven strings in the stack memory (thus it cannot be implemented in a function). <a href="group__utils.html#ga01d1ea65eb6780d91705484dd46833bf">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga01d1ea65eb6780d91705484dd46833bf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:gadce4d1c428f979bf1cf8e1582d2f4052"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gadce4d1c428f979bf1cf8e1582d2f4052">mem_alloc</a> (int size)</td></tr>
|
||||
<tr class="memdesc:gadce4d1c428f979bf1cf8e1582d2f4052"><td class="mdescLeft"> </td><td class="mdescRight">A replacement for <code>malloc</code> function. <a href="group__utils.html#gadce4d1c428f979bf1cf8e1582d2f4052">More...</a><br /></td></tr>
|
||||
<tr class="separator:gadce4d1c428f979bf1cf8e1582d2f4052"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gabe60e8350f3e3b07ed5002ee3449a6ae"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gabe60e8350f3e3b07ed5002ee3449a6ae">mem_free</a> (void *pnt)</td></tr>
|
||||
<tr class="memdesc:gabe60e8350f3e3b07ed5002ee3449a6ae"><td class="mdescLeft"> </td><td class="mdescRight">A replacement for <code>free</code> function. <a href="group__utils.html#gabe60e8350f3e3b07ed5002ee3449a6ae">More...</a><br /></td></tr>
|
||||
<tr class="separator:gabe60e8350f3e3b07ed5002ee3449a6ae"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga825354891d287cc86d2b4ed1b600175a"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga825354891d287cc86d2b4ed1b600175a">string_clone</a> (char *str)</td></tr>
|
||||
<tr class="memdesc:ga825354891d287cc86d2b4ed1b600175a"><td class="mdescLeft"> </td><td class="mdescRight">Replicates a string. <a href="group__utils.html#ga825354891d287cc86d2b4ed1b600175a">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga825354891d287cc86d2b4ed1b600175a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga15630ddb64e977c8243892556feedfd8"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga15630ddb64e977c8243892556feedfd8">string_num_lines</a> (char *text)</td></tr>
|
||||
<tr class="memdesc:ga15630ddb64e977c8243892556feedfd8"><td class="mdescLeft"> </td><td class="mdescRight">Number of lines of a string. <a href="group__utils.html#ga15630ddb64e977c8243892556feedfd8">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga15630ddb64e977c8243892556feedfd8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0ca31b2a579b6ef7c75c41324ed5367c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga0ca31b2a579b6ef7c75c41324ed5367c">string_num_columns</a> (char *text)</td></tr>
|
||||
<tr class="memdesc:ga0ca31b2a579b6ef7c75c41324ed5367c"><td class="mdescLeft"> </td><td class="mdescRight">Maximum number of columns of a string (not counting character ‘’\n'`). <a href="group__utils.html#ga0ca31b2a579b6ef7c75c41324ed5367c">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga0ca31b2a579b6ef7c75c41324ed5367c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad643e0fcac9e59c1a171c460633e8637"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gad643e0fcac9e59c1a171c460633e8637">string_count_char</a> (char *text, char *ch)</td></tr>
|
||||
<tr class="memdesc:gad643e0fcac9e59c1a171c460633e8637"><td class="mdescLeft"> </td><td class="mdescRight">Counts the number of occurrences of an UTF8 character in a text. <a href="group__utils.html#gad643e0fcac9e59c1a171c460633e8637">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad643e0fcac9e59c1a171c460633e8637"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3ec2b60d1636397119c5e0c21987f791"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga3ec2b60d1636397119c5e0c21987f791">string_starts_with</a> (char *text, char *prefix)</td></tr>
|
||||
<tr class="memdesc:ga3ec2b60d1636397119c5e0c21987f791"><td class="mdescLeft"> </td><td class="mdescRight">Tests if a string starts with a prefix. <a href="group__utils.html#ga3ec2b60d1636397119c5e0c21987f791">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3ec2b60d1636397119c5e0c21987f791"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1c5ba308f71c323fbbd7eb9bb34285d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga1c5ba308f71c323fbbd7eb9bb34285d4">string_ends_with</a> (char *text, char *suffix)</td></tr>
|
||||
<tr class="memdesc:ga1c5ba308f71c323fbbd7eb9bb34285d4"><td class="mdescLeft"> </td><td class="mdescRight">Tests if a string ends with a suffix. <a href="group__utils.html#ga1c5ba308f71c323fbbd7eb9bb34285d4">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1c5ba308f71c323fbbd7eb9bb34285d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaa23a827164f7039b9770379cbf008905"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gaa23a827164f7039b9770379cbf008905">string_concat</a> (char *res, int max_length, char *text,...)</td></tr>
|
||||
<tr class="memdesc:gaa23a827164f7039b9770379cbf008905"><td class="mdescLeft"> </td><td class="mdescRight">Concatenates a <code>NULL</code> terminated list of string arguments. <a href="group__utils.html#gaa23a827164f7039b9770379cbf008905">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaa23a827164f7039b9770379cbf008905"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gabe3e28fe49daaf3530e203c4aed1d15f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gabe3e28fe49daaf3530e203c4aed1d15f">random_boolean</a> (int trueProb)</td></tr>
|
||||
<tr class="memdesc:gabe3e28fe49daaf3530e203c4aed1d15f"><td class="mdescLeft"> </td><td class="mdescRight">Generates a random boolean value. <a href="group__utils.html#gabe3e28fe49daaf3530e203c4aed1d15f">More...</a><br /></td></tr>
|
||||
<tr class="separator:gabe3e28fe49daaf3530e203c4aed1d15f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad7954e6a1b9ea073c7bc894dc5af85a9"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gad7954e6a1b9ea073c7bc894dc5af85a9">random_int</a> (int min, int max)</td></tr>
|
||||
<tr class="memdesc:gad7954e6a1b9ea073c7bc894dc5af85a9"><td class="mdescLeft"> </td><td class="mdescRight">Generates a random integer value within a given interval. <a href="group__utils.html#gad7954e6a1b9ea073c7bc894dc5af85a9">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad7954e6a1b9ea073c7bc894dc5af85a9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaa820c93c2f719401b4b1ca54f6ea5c75"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gaa820c93c2f719401b4b1ca54f6ea5c75">random_string</a> (char **list, int *used, int length)</td></tr>
|
||||
<tr class="memdesc:gaa820c93c2f719401b4b1ca54f6ea5c75"><td class="mdescLeft"> </td><td class="mdescRight">Returns a random string from a given string list. <a href="group__utils.html#gaa820c93c2f719401b4b1ca54f6ea5c75">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaa820c93c2f719401b4b1ca54f6ea5c75"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3cffe15b7e5d10a108f1734a9640a2c7"><td class="memItemLeft" align="right" valign="top">
|
||||
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga3cffe15b7e5d10a108f1734a9640a2c7">clear_console</a> ()</td></tr>
|
||||
<tr class="memdesc:ga3cffe15b7e5d10a108f1734a9640a2c7"><td class="mdescLeft"> </td><td class="mdescRight">Clears the terminal. <br /></td></tr>
|
||||
<tr class="separator:ga3cffe15b7e5d10a108f1734a9640a2c7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad3d324aed0ec686314cb0f68dfde9853"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gad3d324aed0ec686314cb0f68dfde9853">move_cursor</a> (int line, int column)</td></tr>
|
||||
<tr class="memdesc:gad3d324aed0ec686314cb0f68dfde9853"><td class="mdescLeft"> </td><td class="mdescRight">Moves the cursor to a position in terminal. <a href="group__utils.html#gad3d324aed0ec686314cb0f68dfde9853">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad3d324aed0ec686314cb0f68dfde9853"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga42702791e6da9510e4f44f33d2dad8f1"><td class="memItemLeft" align="right" valign="top">
|
||||
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga42702791e6da9510e4f44f33d2dad8f1">hide_cursor</a> ()</td></tr>
|
||||
<tr class="memdesc:ga42702791e6da9510e4f44f33d2dad8f1"><td class="mdescLeft"> </td><td class="mdescRight">Hides the terminal cursor. <br /></td></tr>
|
||||
<tr class="separator:ga42702791e6da9510e4f44f33d2dad8f1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1bdd62a6bef7cfd6522dc1412e162559"><td class="memItemLeft" align="right" valign="top">
|
||||
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga1bdd62a6bef7cfd6522dc1412e162559">show_cursor</a> ()</td></tr>
|
||||
<tr class="memdesc:ga1bdd62a6bef7cfd6522dc1412e162559"><td class="mdescLeft"> </td><td class="mdescRight">Shows the terminal cursor. <br /></td></tr>
|
||||
<tr class="separator:ga1bdd62a6bef7cfd6522dc1412e162559"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab8050db5b87bfdee91ee92e67b063478"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gab8050db5b87bfdee91ee92e67b063478">string_list_length</a> (char **list)</td></tr>
|
||||
<tr class="memdesc:gab8050db5b87bfdee91ee92e67b063478"><td class="mdescLeft"> </td><td class="mdescRight">Number of elements of a <code>NULL</code> terminated list of strings. <a href="group__utils.html#gab8050db5b87bfdee91ee92e67b063478">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab8050db5b87bfdee91ee92e67b063478"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga41163cf3a95e702f12506cd54ba3c70c"><td class="memItemLeft" align="right" valign="top">char ** </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga41163cf3a95e702f12506cd54ba3c70c">string_list_clone</a> (char **list)</td></tr>
|
||||
<tr class="memdesc:ga41163cf3a95e702f12506cd54ba3c70c"><td class="mdescLeft"> </td><td class="mdescRight">Replicates a <code>NULL</code> terminated list of strings. <a href="group__utils.html#ga41163cf3a95e702f12506cd54ba3c70c">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga41163cf3a95e702f12506cd54ba3c70c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaacf77b3345bbca43767b08ec0583fe3c"><td class="memItemLeft" align="right" valign="top">char ** </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gaacf77b3345bbca43767b08ec0583fe3c">string_list_free</a> (char **list)</td></tr>
|
||||
<tr class="memdesc:gaacf77b3345bbca43767b08ec0583fe3c"><td class="mdescLeft"> </td><td class="mdescRight">Frees the memory allocated to a <code>NULL</code> terminated list of strings. <a href="group__utils.html#gaacf77b3345bbca43767b08ec0583fe3c">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaacf77b3345bbca43767b08ec0583fe3c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga824373ca8e0b2fdfe3f5c4805cf2ab7e"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#ga824373ca8e0b2fdfe3f5c4805cf2ab7e">int2nstring</a> (char *res, int num, int len)</td></tr>
|
||||
<tr class="memdesc:ga824373ca8e0b2fdfe3f5c4805cf2ab7e"><td class="mdescLeft"> </td><td class="mdescRight">Converts an <code>int</code> value to a string. <a href="group__utils.html#ga824373ca8e0b2fdfe3f5c4805cf2ab7e">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga824373ca8e0b2fdfe3f5c4805cf2ab7e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gacf6edf10cb84412b6bfb431ef87b56d6"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__utils.html#gacf6edf10cb84412b6bfb431ef87b56d6">percentage2string</a> (char *res, int percentage)</td></tr>
|
||||
<tr class="memdesc:gacf6edf10cb84412b6bfb431ef87b56d6"><td class="mdescLeft"> </td><td class="mdescRight">Converts an <code>int</code> percentage to a string. <a href="group__utils.html#gacf6edf10cb84412b6bfb431ef87b56d6">More...</a><br /></td></tr>
|
||||
<tr class="separator:gacf6edf10cb84412b6bfb431ef87b56d6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Useful common functions and macros. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="utils_8h.html">utils.h</a></li>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,37 +0,0 @@
|
|||
var utils_8h =
|
||||
[
|
||||
[ "concat_2str", "group__utils.html#ga22347cbf977a0300726f06257edd79d6", null ],
|
||||
[ "concat_3str", "group__utils.html#ga123e40006d54612c48c2660432dfeb23", null ],
|
||||
[ "concat_4str", "group__utils.html#ga69037999e65cdb42d39988e0fec48af4", null ],
|
||||
[ "concat_5str", "group__utils.html#ga580d1897bc7a8cef16d5a16a2373b876", null ],
|
||||
[ "concat_6str", "group__utils.html#ga34f8c2fcee597a99c5f4c66f2119bca9", null ],
|
||||
[ "concat_7str", "group__utils.html#ga01d1ea65eb6780d91705484dd46833bf", null ],
|
||||
[ "int2str", "group__utils.html#ga3c545b669dff7d67e5ed3c58233ccf4b", null ],
|
||||
[ "int2nstr", "group__utils.html#ga858ece77e79fb78d3db0f1851bf7fe09", null ],
|
||||
[ "long2str", "group__utils.html#ga69373a612a7b4d264371f727217f9954", null ],
|
||||
[ "long2nstr", "group__utils.html#ga50cea1f8154c7c7d2abd68f1ddb33086", null ],
|
||||
[ "perc2str", "group__utils.html#ga59cd66180162d107cf86a51c21d7e6f5", null ],
|
||||
[ "length_vargs_string_list", "group__utils.html#ga7bffda236a079c26302722c7d155f7a5", null ],
|
||||
[ "not_null", "group__utils.html#gadfa0375f8178c737deae23ffa8d152f4", null ],
|
||||
[ "mem_alloc", "group__utils.html#gadce4d1c428f979bf1cf8e1582d2f4052", null ],
|
||||
[ "mem_free", "group__utils.html#gabe60e8350f3e3b07ed5002ee3449a6ae", null ],
|
||||
[ "string_clone", "group__utils.html#ga825354891d287cc86d2b4ed1b600175a", null ],
|
||||
[ "string_num_lines", "group__utils.html#ga15630ddb64e977c8243892556feedfd8", null ],
|
||||
[ "string_num_columns", "group__utils.html#ga0ca31b2a579b6ef7c75c41324ed5367c", null ],
|
||||
[ "string_count_char", "group__utils.html#gad643e0fcac9e59c1a171c460633e8637", null ],
|
||||
[ "string_starts_with", "group__utils.html#ga3ec2b60d1636397119c5e0c21987f791", null ],
|
||||
[ "string_ends_with", "group__utils.html#ga1c5ba308f71c323fbbd7eb9bb34285d4", null ],
|
||||
[ "string_concat", "group__utils.html#gaa23a827164f7039b9770379cbf008905", null ],
|
||||
[ "random_boolean", "group__utils.html#gabe3e28fe49daaf3530e203c4aed1d15f", null ],
|
||||
[ "random_int", "group__utils.html#gad7954e6a1b9ea073c7bc894dc5af85a9", null ],
|
||||
[ "random_string", "group__utils.html#gaa820c93c2f719401b4b1ca54f6ea5c75", null ],
|
||||
[ "clear_console", "group__utils.html#ga3cffe15b7e5d10a108f1734a9640a2c7", null ],
|
||||
[ "move_cursor", "group__utils.html#gad3d324aed0ec686314cb0f68dfde9853", null ],
|
||||
[ "hide_cursor", "group__utils.html#ga42702791e6da9510e4f44f33d2dad8f1", null ],
|
||||
[ "show_cursor", "group__utils.html#ga1bdd62a6bef7cfd6522dc1412e162559", null ],
|
||||
[ "string_list_length", "group__utils.html#gab8050db5b87bfdee91ee92e67b063478", null ],
|
||||
[ "string_list_clone", "group__utils.html#ga41163cf3a95e702f12506cd54ba3c70c", null ],
|
||||
[ "string_list_free", "group__utils.html#gaacf77b3345bbca43767b08ec0583fe3c", null ],
|
||||
[ "int2nstring", "group__utils.html#ga824373ca8e0b2fdfe3f5c4805cf2ab7e", null ],
|
||||
[ "percentage2string", "group__utils.html#gacf6edf10cb84412b6bfb431ef87b56d6", null ]
|
||||
];
|
|
@ -1,330 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.17"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>C++ Library, mos@ua: utils.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">C++ Library, mos@ua
|
||||
 <span id="projectnumber">0.9</span>
|
||||
</div>
|
||||
<div id="projectbrief">cpplib-mos</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',false,false,'search.php','Search');
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('utils_8h_source.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">utils.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="utils_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
|
||||
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#ifndef UTILS_H</span></div>
|
||||
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#define UTILS_H</span></div>
|
||||
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  </div>
|
||||
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include <stdio.h></span></div>
|
||||
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <string.h></span></div>
|
||||
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <errno.h></span></div>
|
||||
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "<a class="code" href="dbc_8h.html">dbc.h</a>"</span></div>
|
||||
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  </div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="group__utils.html#ga22347cbf977a0300726f06257edd79d6"> 36</a></span> <span class="preprocessor">#define concat_2str(str1,str2) \</span></div>
|
||||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor"> char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \</span></div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor"> char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \</span></div>
|
||||
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor"> char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+1); \</span></div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor"> strcpy(__res__, s1); \</span></div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="preprocessor"> strcat(__res__, s2); \</span></div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  </div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="group__utils.html#ga123e40006d54612c48c2660432dfeb23"> 57</a></span> <span class="preprocessor">#define concat_3str(str1,str2,str3) \</span></div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="preprocessor"> char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \</span></div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="preprocessor"> char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \</span></div>
|
||||
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="preprocessor"> char* s3 = (str3) == NULL ? (char*)"" : (char*)(str3); \</span></div>
|
||||
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="preprocessor"> char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+strlen(s3)+1); \</span></div>
|
||||
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="preprocessor"> strcpy(__res__, s1); \</span></div>
|
||||
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="preprocessor"> strcat(__res__, s2); \</span></div>
|
||||
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="preprocessor"> strcat(__res__, s3); \</span></div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  </div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="group__utils.html#ga69037999e65cdb42d39988e0fec48af4"> 81</a></span> <span class="preprocessor">#define concat_4str(str1,str2,str3,str4) \</span></div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="preprocessor"> char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \</span></div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="preprocessor"> char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \</span></div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="preprocessor"> char* s3 = (str3) == NULL ? (char*)"" : (char*)(str3); \</span></div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="preprocessor"> char* s4 = (str4) == NULL ? (char*)"" : (char*)(str4); \</span></div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="preprocessor"> char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+strlen(s3)+strlen(s4)+1); \</span></div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="preprocessor"> strcpy(__res__, s1); \</span></div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="preprocessor"> strcat(__res__, s2); \</span></div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="preprocessor"> strcat(__res__, s3); \</span></div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="preprocessor"> strcat(__res__, s4); \</span></div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  </div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="group__utils.html#ga580d1897bc7a8cef16d5a16a2373b876"> 108</a></span> <span class="preprocessor">#define concat_5str(str1,str2,str3,str4,str5) \</span></div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="preprocessor"> char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \</span></div>
|
||||
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="preprocessor"> char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \</span></div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="preprocessor"> char* s3 = (str3) == NULL ? (char*)"" : (char*)(str3); \</span></div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="preprocessor"> char* s4 = (str4) == NULL ? (char*)"" : (char*)(str4); \</span></div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="preprocessor"> char* s5 = (str5) == NULL ? (char*)"" : (char*)(str5); \</span></div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="preprocessor"> char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+strlen(s3)+strlen(s4)+strlen(s5)+1); \</span></div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="preprocessor"> strcpy(__res__, s1); \</span></div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="preprocessor"> strcat(__res__, s2); \</span></div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="preprocessor"> strcat(__res__, s3); \</span></div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="preprocessor"> strcat(__res__, s4); \</span></div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="preprocessor"> strcat(__res__, s5); \</span></div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  </div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="group__utils.html#ga34f8c2fcee597a99c5f4c66f2119bca9"> 138</a></span> <span class="preprocessor">#define concat_6str(str1,str2,str3,str4,str5,str6) \</span></div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="preprocessor"> char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \</span></div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="preprocessor"> char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \</span></div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="preprocessor"> char* s3 = (str3) == NULL ? (char*)"" : (char*)(str3); \</span></div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="preprocessor"> char* s4 = (str4) == NULL ? (char*)"" : (char*)(str4); \</span></div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="preprocessor"> char* s5 = (str5) == NULL ? (char*)"" : (char*)(str5); \</span></div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="preprocessor"> char* s6 = (str6) == NULL ? (char*)"" : (char*)(str6); \</span></div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="preprocessor"> char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+strlen(s3)+strlen(s4)+strlen(s5)+strlen(s6)+1); \</span></div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="preprocessor"> strcpy(__res__, s1); \</span></div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="preprocessor"> strcat(__res__, s2); \</span></div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="preprocessor"> strcat(__res__, s3); \</span></div>
|
||||
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="preprocessor"> strcat(__res__, s4); \</span></div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="preprocessor"> strcat(__res__, s5); \</span></div>
|
||||
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="preprocessor"> strcat(__res__, s6); \</span></div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  </div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="group__utils.html#ga01d1ea65eb6780d91705484dd46833bf"> 171</a></span> <span class="preprocessor">#define concat_7str(str1,str2,str3,str4,str5,str6,str7) \</span></div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="preprocessor"> char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \</span></div>
|
||||
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="preprocessor"> char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \</span></div>
|
||||
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> <span class="preprocessor"> char* s3 = (str3) == NULL ? (char*)"" : (char*)(str3); \</span></div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="preprocessor"> char* s4 = (str4) == NULL ? (char*)"" : (char*)(str4); \</span></div>
|
||||
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> <span class="preprocessor"> char* s5 = (str5) == NULL ? (char*)"" : (char*)(str5); \</span></div>
|
||||
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> <span class="preprocessor"> char* s6 = (str6) == NULL ? (char*)"" : (char*)(str6); \</span></div>
|
||||
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="preprocessor"> char* s7 = (str7) == NULL ? (char*)"" : (char*)(str7); \</span></div>
|
||||
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> <span class="preprocessor"> char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+strlen(s3)+strlen(s4)+strlen(s5)+strlen(s6)+strlen(s7)+1); \</span></div>
|
||||
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="preprocessor"> strcpy(__res__, s1); \</span></div>
|
||||
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="preprocessor"> strcat(__res__, s2); \</span></div>
|
||||
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="preprocessor"> strcat(__res__, s3); \</span></div>
|
||||
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span> <span class="preprocessor"> strcat(__res__, s4); \</span></div>
|
||||
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="preprocessor"> strcat(__res__, s5); \</span></div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span> <span class="preprocessor"> strcat(__res__, s6); \</span></div>
|
||||
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span> <span class="preprocessor"> strcat(__res__, s7); \</span></div>
|
||||
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  </div>
|
||||
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="group__utils.html#ga3c545b669dff7d67e5ed3c58233ccf4b"> 199</a></span> <span class="preprocessor">#define int2str(num) \</span></div>
|
||||
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span> <span class="preprocessor"> char* __res__ = (char*)alloca(numDigits((int)num)+1); \</span></div>
|
||||
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span> <span class="preprocessor"> sprintf(__res__, "%d", (int)num); \</span></div>
|
||||
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  </div>
|
||||
<div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="group__utils.html#ga858ece77e79fb78d3db0f1851bf7fe09"> 220</a></span> <span class="preprocessor">#define int2nstr(num, len) \</span></div>
|
||||
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span> <span class="preprocessor"> require (len > 0, concat_3str("invalid length value (", int2str(len), ")")); \</span></div>
|
||||
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span> <span class="preprocessor"> int d = numDigits((int)num); \</span></div>
|
||||
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span> <span class="preprocessor"> if (len > d) \</span></div>
|
||||
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span> <span class="preprocessor"> d = len; \</span></div>
|
||||
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span> <span class="preprocessor"> char* __res__ = (char*)alloca(d+1); \</span></div>
|
||||
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span> <span class="preprocessor"> sprintf(__res__, "%0*d", d, (int)num); \</span></div>
|
||||
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  </div>
|
||||
<div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="group__utils.html#ga69373a612a7b4d264371f727217f9954"> 238</a></span> <span class="preprocessor">#define long2str(num) \</span></div>
|
||||
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span> <span class="preprocessor"> char* __res__ = (char*)alloca(numDigits((long)num)+1); \</span></div>
|
||||
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span> <span class="preprocessor"> sprintf(__res__, "%ld", (long)num); \</span></div>
|
||||
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  </div>
|
||||
<div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="group__utils.html#ga50cea1f8154c7c7d2abd68f1ddb33086"> 259</a></span> <span class="preprocessor">#define long2nstr(num, len) \</span></div>
|
||||
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="preprocessor"> require (len > 0, concat_3str("invalid length value (", int2str(len), ")")); \</span></div>
|
||||
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span> <span class="preprocessor"> int d = numDigits((int)num); \</span></div>
|
||||
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span> <span class="preprocessor"> if (len > d) \</span></div>
|
||||
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span> <span class="preprocessor"> d = len; \</span></div>
|
||||
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span> <span class="preprocessor"> char* __res__ = (char*)alloca(d+1); \</span></div>
|
||||
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span> <span class="preprocessor"> sprintf(__res__, "%0*ld", d, (long)num); \</span></div>
|
||||
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  </div>
|
||||
<div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="group__utils.html#ga59cd66180162d107cf86a51c21d7e6f5"> 281</a></span> <span class="preprocessor">#define perc2str(percentage) \</span></div>
|
||||
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span> <span class="preprocessor"> require (percentage >= 0 && percentage <= 100, concat_3str("invalid percentage value (", int2str(percentage), ")")); \</span></div>
|
||||
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span> <span class="preprocessor"> char* __res__ = (char*)alloca(4+1); \</span></div>
|
||||
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span> <span class="preprocessor"> sprintf(__res__, "%3d%%", (int)percentage); \</span></div>
|
||||
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  </div>
|
||||
<div class="line"><a name="l00296"></a><span class="lineno"><a class="line" href="group__utils.html#ga7bffda236a079c26302722c7d155f7a5"> 296</a></span> <span class="preprocessor">#define length_vargs_string_list(first) \</span></div>
|
||||
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span> <span class="preprocessor"> int __res__ = 0; \</span></div>
|
||||
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span> <span class="preprocessor"> va_list ap; \</span></div>
|
||||
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span> <span class="preprocessor"> va_start(ap, first); \</span></div>
|
||||
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span> <span class="preprocessor"> char* t = first; \</span></div>
|
||||
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span> <span class="preprocessor"> while (t != NULL) \</span></div>
|
||||
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span> <span class="preprocessor"> { \</span></div>
|
||||
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span> <span class="preprocessor"> __res__ += strlen(t); \</span></div>
|
||||
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span> <span class="preprocessor"> t = va_arg(ap, char*); \</span></div>
|
||||
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span> <span class="preprocessor"> } \</span></div>
|
||||
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span> <span class="preprocessor"> va_end(ap); \</span></div>
|
||||
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span> <span class="preprocessor"> __res__; \</span></div>
|
||||
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  </div>
|
||||
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span> <span class="preprocessor">#if defined __cplusplus && defined EXCEPTION_POLICY</span></div>
|
||||
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span> <span class="preprocessor">#define not_null(pnt) \</span></div>
|
||||
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span> <span class="preprocessor"> if ((pnt) == NULL) \</span></div>
|
||||
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span> <span class="preprocessor"> throw string_concat(NULL, 0, (char*)"Null pointer error", (char*)", pointer: \"", #pnt, (char*)"\", function: \"", __FUNCTION__, (char*)"\":", int2str(__LINE__), (char*)", file: \"", __FILE__, (char*)"\"\n", NULL); \</span></div>
|
||||
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span> <span class="preprocessor"> pnt; \</span></div>
|
||||
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span> <span class="preprocessor">#else</span></div>
|
||||
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  </div>
|
||||
<div class="line"><a name="l00336"></a><span class="lineno"><a class="line" href="group__utils.html#gadfa0375f8178c737deae23ffa8d152f4"> 336</a></span> <span class="preprocessor">#define not_null(pnt) \</span></div>
|
||||
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span> <span class="preprocessor"> ({ \</span></div>
|
||||
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span> <span class="preprocessor"> if ((pnt) == NULL) \</span></div>
|
||||
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span> <span class="preprocessor"> { \</span></div>
|
||||
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span> <span class="preprocessor"> fprintf (stderr, "Null pointer error, pointer: \"%s\", function: \"%s\":%d, file: \"%s\"\n", \</span></div>
|
||||
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span> <span class="preprocessor"> #pnt, __FUNCTION__, __LINE__ , __FILE__); \</span></div>
|
||||
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span> <span class="preprocessor"> *((int*)0) = 0; \</span></div>
|
||||
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span> <span class="preprocessor"> abort (); \</span></div>
|
||||
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span> <span class="preprocessor"> } \</span></div>
|
||||
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span> <span class="preprocessor"> pnt; \</span></div>
|
||||
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span> <span class="preprocessor"> })</span></div>
|
||||
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  </div>
|
||||
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span> <span class="keywordtype">void</span>* <a class="code" href="group__utils.html#gadce4d1c428f979bf1cf8e1582d2f4052">mem_alloc</a>(<span class="keywordtype">int</span> size);</div>
|
||||
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  </div>
|
||||
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span> <span class="keywordtype">void</span> <a class="code" href="group__utils.html#gabe60e8350f3e3b07ed5002ee3449a6ae">mem_free</a>(<span class="keywordtype">void</span>* pnt);</div>
|
||||
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  </div>
|
||||
<div class="line"><a name="l00393"></a><span class="lineno"> 393</span> <span class="keywordtype">char</span>* <a class="code" href="group__utils.html#ga825354891d287cc86d2b4ed1b600175a">string_clone</a>(<span class="keywordtype">char</span>* str);</div>
|
||||
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  </div>
|
||||
<div class="line"><a name="l00406"></a><span class="lineno"> 406</span> <span class="keywordtype">int</span> <a class="code" href="group__utils.html#ga15630ddb64e977c8243892556feedfd8">string_num_lines</a>(<span class="keywordtype">char</span>* text);</div>
|
||||
<div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  </div>
|
||||
<div class="line"><a name="l00419"></a><span class="lineno"> 419</span> <span class="keywordtype">int</span> <a class="code" href="group__utils.html#ga0ca31b2a579b6ef7c75c41324ed5367c">string_num_columns</a>(<span class="keywordtype">char</span>* text);</div>
|
||||
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  </div>
|
||||
<div class="line"><a name="l00434"></a><span class="lineno"> 434</span> <span class="keywordtype">int</span> <a class="code" href="group__utils.html#gad643e0fcac9e59c1a171c460633e8637">string_count_char</a>(<span class="keywordtype">char</span>* text, <span class="keywordtype">char</span>* ch);</div>
|
||||
<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  </div>
|
||||
<div class="line"><a name="l00449"></a><span class="lineno"> 449</span> <span class="keywordtype">int</span> <a class="code" href="group__utils.html#ga3ec2b60d1636397119c5e0c21987f791">string_starts_with</a>(<span class="keywordtype">char</span>* text, <span class="keywordtype">char</span>* prefix);</div>
|
||||
<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  </div>
|
||||
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span> <span class="keywordtype">int</span> <a class="code" href="group__utils.html#ga1c5ba308f71c323fbbd7eb9bb34285d4">string_ends_with</a>(<span class="keywordtype">char</span>* text, <span class="keywordtype">char</span>* suffix);</div>
|
||||
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  </div>
|
||||
<div class="line"><a name="l00487"></a><span class="lineno"> 487</span> <span class="keywordtype">char</span>* <a class="code" href="group__utils.html#gaa23a827164f7039b9770379cbf008905">string_concat</a>(<span class="keywordtype">char</span>* res, <span class="keywordtype">int</span> max_length, <span class="keywordtype">char</span>* text, ...);</div>
|
||||
<div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  </div>
|
||||
<div class="line"><a name="l00504"></a><span class="lineno"> 504</span> <span class="keywordtype">int</span> <a class="code" href="group__utils.html#gabe3e28fe49daaf3530e203c4aed1d15f">random_boolean</a>(<span class="keywordtype">int</span> trueProb);</div>
|
||||
<div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  </div>
|
||||
<div class="line"><a name="l00521"></a><span class="lineno"> 521</span> <span class="keywordtype">int</span> <a class="code" href="group__utils.html#gad7954e6a1b9ea073c7bc894dc5af85a9">random_int</a>(<span class="keywordtype">int</span> min, <span class="keywordtype">int</span> max);</div>
|
||||
<div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  </div>
|
||||
<div class="line"><a name="l00541"></a><span class="lineno"> 541</span> <span class="keywordtype">char</span>* <a class="code" href="group__utils.html#gaa820c93c2f719401b4b1ca54f6ea5c75">random_string</a>(<span class="keywordtype">char</span>** list, <span class="keywordtype">int</span>* used, <span class="keywordtype">int</span> length);</div>
|
||||
<div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  </div>
|
||||
<div class="line"><a name="l00546"></a><span class="lineno"> 546</span> <span class="keywordtype">void</span> <a class="code" href="group__utils.html#ga3cffe15b7e5d10a108f1734a9640a2c7">clear_console</a>();</div>
|
||||
<div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  </div>
|
||||
<div class="line"><a name="l00558"></a><span class="lineno"> 558</span> <span class="keywordtype">void</span> <a class="code" href="group__utils.html#gad3d324aed0ec686314cb0f68dfde9853">move_cursor</a>(<span class="keywordtype">int</span> line,<span class="keywordtype">int</span> column);</div>
|
||||
<div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  </div>
|
||||
<div class="line"><a name="l00563"></a><span class="lineno"> 563</span> <span class="keywordtype">void</span> <a class="code" href="group__utils.html#ga42702791e6da9510e4f44f33d2dad8f1">hide_cursor</a>();</div>
|
||||
<div class="line"><a name="l00564"></a><span class="lineno"> 564</span>  </div>
|
||||
<div class="line"><a name="l00568"></a><span class="lineno"> 568</span> <span class="keywordtype">void</span> <a class="code" href="group__utils.html#ga1bdd62a6bef7cfd6522dc1412e162559">show_cursor</a>();</div>
|
||||
<div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  </div>
|
||||
<div class="line"><a name="l00581"></a><span class="lineno"> 581</span> <span class="keywordtype">int</span> <a class="code" href="group__utils.html#gab8050db5b87bfdee91ee92e67b063478">string_list_length</a>(<span class="keywordtype">char</span>** list);</div>
|
||||
<div class="line"><a name="l00582"></a><span class="lineno"> 582</span>  </div>
|
||||
<div class="line"><a name="l00596"></a><span class="lineno"> 596</span> <span class="keywordtype">char</span>** <a class="code" href="group__utils.html#ga41163cf3a95e702f12506cd54ba3c70c">string_list_clone</a>(<span class="keywordtype">char</span>** list);</div>
|
||||
<div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  </div>
|
||||
<div class="line"><a name="l00611"></a><span class="lineno"> 611</span> <span class="keywordtype">char</span>** <a class="code" href="group__utils.html#gaacf77b3345bbca43767b08ec0583fe3c">string_list_free</a>(<span class="keywordtype">char</span>** list);</div>
|
||||
<div class="line"><a name="l00612"></a><span class="lineno"> 612</span>  </div>
|
||||
<div class="line"><a name="l00613"></a><span class="lineno"> 613</span> <span class="keywordtype">int</span> numDigits(<span class="keywordtype">int</span> num);</div>
|
||||
<div class="line"><a name="l00614"></a><span class="lineno"> 614</span>  </div>
|
||||
<div class="line"><a name="l00632"></a><span class="lineno"> 632</span> <span class="keywordtype">char</span>* <a class="code" href="group__utils.html#ga824373ca8e0b2fdfe3f5c4805cf2ab7e">int2nstring</a>(<span class="keywordtype">char</span>* res, <span class="keywordtype">int</span> num, <span class="keywordtype">int</span> len);</div>
|
||||
<div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  </div>
|
||||
<div class="line"><a name="l00649"></a><span class="lineno"> 649</span> <span class="keywordtype">char</span>* <a class="code" href="group__utils.html#gacf6edf10cb84412b6bfb431ef87b56d6">percentage2string</a>(<span class="keywordtype">char</span>* res, <span class="keywordtype">int</span> percentage);</div>
|
||||
<div class="line"><a name="l00650"></a><span class="lineno"> 650</span>  </div>
|
||||
<div class="line"><a name="l00651"></a><span class="lineno"> 651</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00652"></a><span class="lineno"> 652</span>  </div>
|
||||
<div class="line"><a name="l00653"></a><span class="lineno"> 653</span> <span class="comment">/* ************************************************** */</span></div>
|
||||
<div class="line"><a name="l00657"></a><span class="lineno"> 657</span> <span class="comment">/* ************************************************** */</span></div>
|
||||
<div class="line"><a name="l00658"></a><span class="lineno"> 658</span>  </div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="agroup__utils_html_gad7954e6a1b9ea073c7bc894dc5af85a9"><div class="ttname"><a href="group__utils.html#gad7954e6a1b9ea073c7bc894dc5af85a9">random_int</a></div><div class="ttdeci">int random_int(int min, int max)</div><div class="ttdoc">Generates a random integer value within a given interval.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_gab8050db5b87bfdee91ee92e67b063478"><div class="ttname"><a href="group__utils.html#gab8050db5b87bfdee91ee92e67b063478">string_list_length</a></div><div class="ttdeci">int string_list_length(char **list)</div><div class="ttdoc">Number of elements of a NULL terminated list of strings.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_ga825354891d287cc86d2b4ed1b600175a"><div class="ttname"><a href="group__utils.html#ga825354891d287cc86d2b4ed1b600175a">string_clone</a></div><div class="ttdeci">char * string_clone(char *str)</div><div class="ttdoc">Replicates a string.</div></div>
|
||||
<div class="ttc" id="adbc_8h_html"><div class="ttname"><a href="dbc_8h.html">dbc.h</a></div><div class="ttdoc">Design-by-Contract module.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_gabe60e8350f3e3b07ed5002ee3449a6ae"><div class="ttname"><a href="group__utils.html#gabe60e8350f3e3b07ed5002ee3449a6ae">mem_free</a></div><div class="ttdeci">void mem_free(void *pnt)</div><div class="ttdoc">A replacement for free function.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_ga1c5ba308f71c323fbbd7eb9bb34285d4"><div class="ttname"><a href="group__utils.html#ga1c5ba308f71c323fbbd7eb9bb34285d4">string_ends_with</a></div><div class="ttdeci">int string_ends_with(char *text, char *suffix)</div><div class="ttdoc">Tests if a string ends with a suffix.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_gaacf77b3345bbca43767b08ec0583fe3c"><div class="ttname"><a href="group__utils.html#gaacf77b3345bbca43767b08ec0583fe3c">string_list_free</a></div><div class="ttdeci">char ** string_list_free(char **list)</div><div class="ttdoc">Frees the memory allocated to a NULL terminated list of strings.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_gad643e0fcac9e59c1a171c460633e8637"><div class="ttname"><a href="group__utils.html#gad643e0fcac9e59c1a171c460633e8637">string_count_char</a></div><div class="ttdeci">int string_count_char(char *text, char *ch)</div><div class="ttdoc">Counts the number of occurrences of an UTF8 character in a text.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_ga1bdd62a6bef7cfd6522dc1412e162559"><div class="ttname"><a href="group__utils.html#ga1bdd62a6bef7cfd6522dc1412e162559">show_cursor</a></div><div class="ttdeci">void show_cursor()</div><div class="ttdoc">Shows the terminal cursor.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_gacf6edf10cb84412b6bfb431ef87b56d6"><div class="ttname"><a href="group__utils.html#gacf6edf10cb84412b6bfb431ef87b56d6">percentage2string</a></div><div class="ttdeci">char * percentage2string(char *res, int percentage)</div><div class="ttdoc">Converts an int percentage to a string.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_gabe3e28fe49daaf3530e203c4aed1d15f"><div class="ttname"><a href="group__utils.html#gabe3e28fe49daaf3530e203c4aed1d15f">random_boolean</a></div><div class="ttdeci">int random_boolean(int trueProb)</div><div class="ttdoc">Generates a random boolean value.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_ga15630ddb64e977c8243892556feedfd8"><div class="ttname"><a href="group__utils.html#ga15630ddb64e977c8243892556feedfd8">string_num_lines</a></div><div class="ttdeci">int string_num_lines(char *text)</div><div class="ttdoc">Number of lines of a string.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_ga3cffe15b7e5d10a108f1734a9640a2c7"><div class="ttname"><a href="group__utils.html#ga3cffe15b7e5d10a108f1734a9640a2c7">clear_console</a></div><div class="ttdeci">void clear_console()</div><div class="ttdoc">Clears the terminal.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_ga3ec2b60d1636397119c5e0c21987f791"><div class="ttname"><a href="group__utils.html#ga3ec2b60d1636397119c5e0c21987f791">string_starts_with</a></div><div class="ttdeci">int string_starts_with(char *text, char *prefix)</div><div class="ttdoc">Tests if a string starts with a prefix.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_gadce4d1c428f979bf1cf8e1582d2f4052"><div class="ttname"><a href="group__utils.html#gadce4d1c428f979bf1cf8e1582d2f4052">mem_alloc</a></div><div class="ttdeci">void * mem_alloc(int size)</div><div class="ttdoc">A replacement for malloc function.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_gad3d324aed0ec686314cb0f68dfde9853"><div class="ttname"><a href="group__utils.html#gad3d324aed0ec686314cb0f68dfde9853">move_cursor</a></div><div class="ttdeci">void move_cursor(int line, int column)</div><div class="ttdoc">Moves the cursor to a position in terminal.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_gaa820c93c2f719401b4b1ca54f6ea5c75"><div class="ttname"><a href="group__utils.html#gaa820c93c2f719401b4b1ca54f6ea5c75">random_string</a></div><div class="ttdeci">char * random_string(char **list, int *used, int length)</div><div class="ttdoc">Returns a random string from a given string list.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_ga824373ca8e0b2fdfe3f5c4805cf2ab7e"><div class="ttname"><a href="group__utils.html#ga824373ca8e0b2fdfe3f5c4805cf2ab7e">int2nstring</a></div><div class="ttdeci">char * int2nstring(char *res, int num, int len)</div><div class="ttdoc">Converts an int value to a string.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_gaa23a827164f7039b9770379cbf008905"><div class="ttname"><a href="group__utils.html#gaa23a827164f7039b9770379cbf008905">string_concat</a></div><div class="ttdeci">char * string_concat(char *res, int max_length, char *text,...)</div><div class="ttdoc">Concatenates a NULL terminated list of string arguments.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_ga41163cf3a95e702f12506cd54ba3c70c"><div class="ttname"><a href="group__utils.html#ga41163cf3a95e702f12506cd54ba3c70c">string_list_clone</a></div><div class="ttdeci">char ** string_list_clone(char **list)</div><div class="ttdoc">Replicates a NULL terminated list of strings.</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_ga0ca31b2a579b6ef7c75c41324ed5367c"><div class="ttname"><a href="group__utils.html#ga0ca31b2a579b6ef7c75c41324ed5367c">string_num_columns</a></div><div class="ttdeci">int string_num_columns(char *text)</div><div class="ttdoc">Maximum number of columns of a string (not counting character ‘’\n'`).</div></div>
|
||||
<div class="ttc" id="agroup__utils_html_ga42702791e6da9510e4f44f33d2dad8f1"><div class="ttname"><a href="group__utils.html#ga42702791e6da9510e4f44f33d2dad8f1">hide_cursor</a></div><div class="ttdeci">void hide_cursor()</div><div class="ttdoc">Hides the terminal cursor.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="utils_8h.html">utils.h</a></li>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,186 +0,0 @@
|
|||
/**
|
||||
* \defgroup DbC DbC
|
||||
* \ingroup concurrency-library
|
||||
* \brief Design-by-Contract module.
|
||||
*
|
||||
* \details This module gives a better support for DbC in C++.
|
||||
*
|
||||
* When compared with `assert.h` this module offers the following functionalities:
|
||||
* - separates different assertion types (preconditions, postconditions, invariants, and others);
|
||||
* - augments assert with error message strings;
|
||||
* - implements two error handling policies:
|
||||
* -# EXIT_POLICY (default): describes the failed assertion in `stderr` (with the identification
|
||||
* and the precise location of the assertion), generates a segmentation fault
|
||||
* (enabling a stack trace within a debugger like `gdb`), and exits program execution;
|
||||
* -# EXCEPTION_POLICY: throws a `char*` exception with the description of the failed assertion.
|
||||
*
|
||||
* Debug settings:
|
||||
* - As happens with `assert.h`, this module accepts <b>`NDEBUG`</b> macro definition to disable all
|
||||
* assertion run-time verification.
|
||||
* - Also, each assertion type verification can be disabled with macros: <b>`NDEBUG_CHECKS`</b>,
|
||||
* <b>`NDEBUG_PRECONDITIONS`</b>, <b>`NDEBUG_POSTCONDITIONS`</b>, and <b>`NDEBUG_INVARIANTS`</b>.
|
||||
* - A special (high priority) macro named <b>`DEBUG_ONLY_PRECONDITIONS`</b> ensures that only precondition
|
||||
* debugging remains active (regardless of other debug definitions).
|
||||
*
|
||||
* \author Miguel Oliveira e Silva, 2018
|
||||
* @{
|
||||
**/
|
||||
|
||||
/*!
|
||||
* \file
|
||||
* \brief Design-by-Contract module.
|
||||
*/
|
||||
|
||||
#ifndef DBC_H
|
||||
#define DBC_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include "utils.h"
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define NDEBUG_CHECKS
|
||||
#define NDEBUG_PRECONDITIONS
|
||||
#define NDEBUG_POSTCONDITIONS
|
||||
#define NDEBUG_INVARIANTS
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ONLY_PRECONDITIONS
|
||||
#ifdef NDEBUG_PRECONDITIONS
|
||||
#undef NDEBUG_PRECONDITIONS
|
||||
#endif
|
||||
#ifndef NDEBUG_CHECKS
|
||||
#define NDEBUG_CHECKS
|
||||
#endif
|
||||
#ifndef NDEBUG_POSTCONDITIONS
|
||||
#define NDEBUG_POSTCONDITIONS
|
||||
#endif
|
||||
#ifndef NDEBUG_INVARIANTS
|
||||
#define NDEBUG_INVARIANTS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// check:
|
||||
#ifdef NDEBUG_CHECKS
|
||||
#define check(condition, message)
|
||||
#else
|
||||
#if defined __cplusplus && defined EXCEPTION_POLICY
|
||||
#define check(condition, message) \
|
||||
if (!(condition)) \
|
||||
throw string_concat(NULL, 0, (char*)"Assertion fail", message[0] ? (char*)": " : (char*)"", message, (char*)", assertion: \"", #condition, (char*)"\", function: \"", __FUNCTION__, (char*)"\":", int2str(__LINE__), (char*)", file: \"", __FILE__, (char*)"\"\n", NULL)
|
||||
#else // EXIT_POLICY (default)
|
||||
/**
|
||||
* \brief Checks the verification of an general algorithm assertion.
|
||||
*
|
||||
* \details This assertion verification can be disabled at compile time by defining the macro <b>`NDEBUG_CHECKS`</b>.
|
||||
*
|
||||
* \param [in] condition expression to assert its truthness
|
||||
* \param [in] message text to be presented with error information when the assertion fails
|
||||
*/
|
||||
#define check(condition, message) \
|
||||
if (!(condition)) \
|
||||
do { \
|
||||
fprintf (stderr, "Assertion fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n", \
|
||||
message[0] ? ": " : "", message, #condition, __FUNCTION__, __LINE__ , __FILE__); \
|
||||
*((int*)0) = 0; \
|
||||
abort (); \
|
||||
} while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// precondition:
|
||||
#ifdef NDEBUG_PRECONDITIONS
|
||||
#define require(condition, message)
|
||||
#else
|
||||
#if defined __cplusplus && defined EXCEPTION_POLICY
|
||||
#define require(condition, message) \
|
||||
if (!(condition)) \
|
||||
throw string_concat(NULL, 0, (char*)"Precondition fail", message[0] ? (char*)": " : (char*)"", message, (char*)", assertion: \"", #condition, (char*)"\", function: \"", __FUNCTION__, (char*)"\":", int2str(__LINE__), (char*)", file: \"", __FILE__, (char*)"\"\n", NULL)
|
||||
#else // EXIT_POLICY (default)
|
||||
/**
|
||||
* \brief Checks the verification of a precondition.
|
||||
*
|
||||
* \details This assertion verification can be disabled at compile time by defining the macro <b>`NDEBUG_PRECONDITIONS`</b>.
|
||||
*
|
||||
* \param [in] condition expression to assert its truthness
|
||||
* \param [in] message text to be presented with error information when the assertion fails
|
||||
*/
|
||||
#define require(condition, message) \
|
||||
if (!(condition)) \
|
||||
do { \
|
||||
fprintf (stderr, "Precondition fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n", \
|
||||
message[0] ? ": " : "", message, #condition, __FUNCTION__, __LINE__ , __FILE__); \
|
||||
*((int*)0) = 0; \
|
||||
abort (); \
|
||||
} while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// postcondition:
|
||||
#ifdef NDEBUG_POSTCONDITIONS
|
||||
#define ensure(condition, message)
|
||||
#else
|
||||
#if defined __cplusplus && defined EXCEPTION_POLICY
|
||||
#define ensure(condition, message) \
|
||||
if (!(condition)) \
|
||||
throw string_concat(NULL, 0, (char*)"Postcondition fail", message[0] ? (char*)": " : (char*)"", message, (char*)", assertion: \"", #condition, (char*)"\", function: \"", __FUNCTION__, (char*)"\":", int2str(__LINE__), (char*)", file: \"", __FILE__, (char*)"\"\n", NULL)
|
||||
#else // EXIT_POLICY (default)
|
||||
/**
|
||||
* \brief Checks the verification of a postcondition.
|
||||
*
|
||||
* \details This assertion verification can be disabled at compile time by defining the macro <b>`NDEBUG_POSTCONDITIONS`</b>.
|
||||
*
|
||||
* \param [in] condition expression to assert its truthness
|
||||
* \param [in] message text to be presented with error information when the assertion fails
|
||||
*/
|
||||
#define ensure(condition, message) \
|
||||
if (!(condition)) \
|
||||
do { \
|
||||
fprintf (stderr, "Postcondition fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n", \
|
||||
message[0] ? ": " : "", message, #condition, __FUNCTION__, __LINE__ , __FILE__); \
|
||||
*((int*)0) = 0; \
|
||||
abort (); \
|
||||
} while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// invariant:
|
||||
#ifdef NDEBUG_INVARIANTS
|
||||
#define invariant(condition, message)
|
||||
#else
|
||||
#if defined __cplusplus && defined EXCEPTION_POLICY
|
||||
#define invariant(condition, message) \
|
||||
if (!(condition)) \
|
||||
throw string_concat(NULL, 0, (char*)"Invariant fail", message[0] ? (char*)": " : (char*)"", message, (char*)", assertion: \"", #condition, (char*)"\", function: \"", __FUNCTION__, (char*)"\":", int2str(__LINE__), (char*)", file: \"", __FILE__, (char*)"\"\n", NULL)
|
||||
#else // EXIT_POLICY (default)
|
||||
/**
|
||||
* \brief Checks the verification of an invariant.
|
||||
*
|
||||
* \details This assertion verification can be disabled at compile time by defining the macro <b>`NDEBUG_INVARIANTS`</b>.
|
||||
*
|
||||
* \param [in] condition expression to assert its truthness
|
||||
* \param [in] message text to be presented with error information when the assertion fails
|
||||
*/
|
||||
#define invariant(condition, message) \
|
||||
if (!(condition)) \
|
||||
do { \
|
||||
fprintf (stderr, "Invariant fail%s%s, assertion: \"%s\", function: \"%s\":%d, file: \"%s\"\n", \
|
||||
message[0] ? ": " : "", message, #condition, __FUNCTION__, __LINE__ , __FILE__); \
|
||||
*((int*)0) = 0; \
|
||||
abort (); \
|
||||
} while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* ************************************************** */
|
||||
/**
|
||||
* @} close group DbC
|
||||
**/
|
||||
/* ************************************************** */
|
||||
|
|
@ -1,531 +0,0 @@
|
|||
/**
|
||||
* \defgroup process process
|
||||
* \ingroup concurrency-library
|
||||
*
|
||||
* \brief \ref process "Process", \ref sysV "System-V", and \ref posix_sem "POSIX libraries" wrapper module.
|
||||
*
|
||||
* \details This module removes defensive programming approach of native libraries.
|
||||
*
|
||||
* All implemented functions, have exactly the same arguments and/or result of the original function,
|
||||
* with the exception of returning an error indication.
|
||||
*
|
||||
* Errors are handled by the implementation of two policies:
|
||||
* -# EXIT_POLICY (default): describes the failed call in `stderr` (with the identification
|
||||
* of the errno error, and the precise location the call), generates a segmentation fault
|
||||
* (enabling a stack trace within a debugger like `gdb`), and exits program execution;
|
||||
* -# EXCEPTION_POLICY: throws a `int` exception with the (errno) status error returned by the original function.
|
||||
*
|
||||
* <p><b>System V group of IPC mechanisms</b>
|
||||
*
|
||||
* @anchor sysV
|
||||
*
|
||||
* There are three resources for IPC: \ref shm "shared memory", \ref sem "semaphores", and \ref msg "message queues".
|
||||
*
|
||||
* Common to all, is resource handling through a non-negative integer identifier.
|
||||
* After proper creation and initialization, different processes can establish communication
|
||||
* using the same integer identifier.
|
||||
*
|
||||
* A key (`key_t`) is used to establish this common identifier.
|
||||
* There are three possibilities to define a key:
|
||||
*
|
||||
* 1. `IPC_PRIVATE`: In this case an alternative channel to communicate the identifier
|
||||
* between processes is necessary (parent/child fork, file system, ...).
|
||||
*
|
||||
* 2. A fixed predetermined key number (may collide with other existing keys).
|
||||
*
|
||||
* 3. `ftok` function to generate a key from a path and a byte integer.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* - create new identifier: `msgget`/`semget`/`shmget` with a key and `IPC_CREAT` and `IPC_EXCL` flags
|
||||
* - get existing identifier: `msgget`/`semget`/`shmget` with a key and other arguments as zero
|
||||
*
|
||||
* \author Miguel Oliveira e Silva, 2017-2018
|
||||
* @{
|
||||
**/
|
||||
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief \ref process "Process", \ref sysV "System-V", and \ref posix_sem "POSIX libraries" wrapper module.
|
||||
* \remarks Removes defensive programming from native libraries
|
||||
**/
|
||||
|
||||
#ifndef PROCESS_H
|
||||
#define PROCESS_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include <sys/sem.h>
|
||||
#include <semaphore.h>
|
||||
#include <signal.h>
|
||||
|
||||
//#define EXCEPTION_POLICY
|
||||
//#define EXIT_POLICY // DEFAULT
|
||||
|
||||
|
||||
/** @name Process handling
|
||||
* @anchor process @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `fork` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 fork @endverbatim
|
||||
*
|
||||
* @see https://man.cx/fork(2)
|
||||
*/
|
||||
pid_t pfork(void);
|
||||
|
||||
/**
|
||||
* \brief `wait` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 wait @endverbatim
|
||||
*
|
||||
* @see https://man.cx/wait(2)
|
||||
*/
|
||||
pid_t pwait(int *status);
|
||||
|
||||
/**
|
||||
* \brief `waitpid` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 waitpid @endverbatim
|
||||
*
|
||||
* @see https://man.cx/waitpid(2)
|
||||
*/
|
||||
pid_t pwaitpid(pid_t pid, int *status, int options);
|
||||
|
||||
/**
|
||||
* \brief `kill` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 kill @endverbatim
|
||||
*
|
||||
* @see https://man.cx/kill(2)
|
||||
*/
|
||||
void pkill(pid_t pid, int sig);
|
||||
|
||||
/**
|
||||
* \brief `execl` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 execl @endverbatim
|
||||
*
|
||||
* @see https://man.cx/execl(3)
|
||||
*/
|
||||
void pexecl(const char *pathname, const char *arg, ... /* (char *) NULL */);
|
||||
|
||||
/**
|
||||
* \brief `sigaction` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 sigaction @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sigaction(2)
|
||||
*/
|
||||
void psigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name System V - shared memory
|
||||
* @anchor shm
|
||||
*
|
||||
* \par <b>Example</b>
|
||||
* @code
|
||||
#include <process.h> // #include <sys/shm.h>
|
||||
...
|
||||
int shmid;
|
||||
// creation:
|
||||
shmid = pshmget(key, size, 0600 | IPC_CREAT | IPC_EXCL);
|
||||
// or, use existing:
|
||||
shmid = pshmget(key, 0, 0);
|
||||
...
|
||||
// attach shm to pointer address:
|
||||
void* p = pshmat(shmid, NULL, 0);
|
||||
...
|
||||
// detach shm from pointer address:
|
||||
pshmdt(p);
|
||||
...
|
||||
// destroy shm:
|
||||
pshmctl(shmid, IPC_RMID, NULL);
|
||||
@endcode
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `shmget` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD>(size > 0) || !(shmflg & IPC_CREAT)</DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 shmget @endverbatim
|
||||
*
|
||||
* @see https://man.cx/shmget(2)
|
||||
*/
|
||||
int pshmget(key_t key, size_t size, int shmflg);
|
||||
|
||||
/**
|
||||
* \brief `shmctl` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 shmctl @endverbatim
|
||||
*
|
||||
* @see https://man.cx/shmctl(2)
|
||||
*/
|
||||
int pshmctl(int shmid, int cmd, struct shmid_ds *buf);
|
||||
|
||||
/**
|
||||
* \brief `shmat` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 shmat @endverbatim
|
||||
*
|
||||
* @see https://man.cx/shmat(2)
|
||||
*/
|
||||
void *pshmat(int shmid, const void *shmaddr, int shmflg);
|
||||
|
||||
/**
|
||||
* \brief `shmdt` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 shmdt @endverbatim
|
||||
*
|
||||
* @see https://man.cx/shmdt(2)
|
||||
*/
|
||||
void pshmdt(const void *shmaddr);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name System V - semaphores
|
||||
* @anchor sem
|
||||
*
|
||||
* \par <b>Example</b>
|
||||
* @code
|
||||
#include <process.h> // #include <sys/sem.h>
|
||||
...
|
||||
int semid;
|
||||
// creation:
|
||||
semid = psemget(key, 1, 0600 | IPC_CREAT | IPC_EXCL); // 1 semaphore!
|
||||
// or, use existing:
|
||||
semid = psemget(key, 0, 0);
|
||||
...
|
||||
// decrement:
|
||||
struct sembuf down = {0, -1, 0};
|
||||
psemop(semid, &down, 1);
|
||||
// or, simply use provided function:
|
||||
psem_down(semid, 0); // NOTE: there is no sem_down in default library!
|
||||
...
|
||||
// increment:
|
||||
struct sembuf up = {0, 1, 0};
|
||||
psemop(semid, &up, 1);
|
||||
// or, simply use provided function:
|
||||
psem_up(semid, 0); // NOTE: there is no sem_up in default library!
|
||||
...
|
||||
// destroy sem 0:
|
||||
psemctl(semid, 0, IPC_RMID, NULL);
|
||||
@endcode
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `semget` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>nsems > 0</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 semget @endverbatim
|
||||
*
|
||||
* @see https://man.cx/semget(2)
|
||||
*/
|
||||
int psemget(key_t key, int nsems, int semflg);
|
||||
|
||||
/**
|
||||
* \brief `semctl` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 semctl @endverbatim
|
||||
*
|
||||
* @see https://man.cx/semctl(2)
|
||||
*/
|
||||
int psemctl(int semid, int semnum, int cmd);
|
||||
int psemctl(int semid, int semnum, int cmd, void *u);
|
||||
|
||||
/**
|
||||
* \brief `semop` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 semop @endverbatim
|
||||
*
|
||||
* @see https://man.cx/semop(2)
|
||||
*/
|
||||
void psemop(int semid, struct sembuf *sops, size_t nsops);
|
||||
|
||||
/**
|
||||
* \brief Increment a semaphore (uses psemop()).
|
||||
*/
|
||||
void psem_up(int semid, short unsigned int index);
|
||||
|
||||
/**
|
||||
* \brief Decrements a semaphore (uses psemop()).
|
||||
*/
|
||||
void psem_down(int semid, short unsigned int index);
|
||||
|
||||
/**
|
||||
* \brief Decrements atomically two semaphores in a System V semaphore array (uses psemop()).
|
||||
*/
|
||||
void psem_down2(int semid, short unsigned int index1, unsigned int index2);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name System V - message queues
|
||||
* @anchor msg
|
||||
*
|
||||
* \par <b>Example</b>
|
||||
* @code
|
||||
#include <process.h> // #include <sys/msg.h>
|
||||
...
|
||||
typedef struct Item
|
||||
{
|
||||
...
|
||||
} Item;
|
||||
typedef struct Message
|
||||
{
|
||||
long type;
|
||||
Item item;
|
||||
} Message;
|
||||
...
|
||||
int msgid;
|
||||
// creation:
|
||||
msgid = pmsgget(key, 0600 | IPC_CREAT | IPC_EXCL);
|
||||
// or, use existing:
|
||||
msgid = pmsgget(key, 0);
|
||||
...
|
||||
Message msg;
|
||||
// send msg:
|
||||
msg = ...;
|
||||
pmsgsnd(msgid, &msg, sizeof(Item), 0);
|
||||
...
|
||||
// receive msg:
|
||||
pmsgrcv(msgid, &msg, sizeof(Item), type, 0);
|
||||
...
|
||||
// destroy msg:
|
||||
pmsgctl(msgid, IPC_RMID, NULL);
|
||||
@endcode
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `msgget` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 msgget @endverbatim
|
||||
*
|
||||
* @see https://man.cx/msgget(2)
|
||||
*/
|
||||
int pmsgget(key_t key, int msgflg);
|
||||
|
||||
/**
|
||||
* \brief `msgctl` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 msgctl @endverbatim
|
||||
*
|
||||
* @see https://man.cx/msgctl(2)
|
||||
*/
|
||||
int pmsgctl(int msqid, int cmd, struct msqid_ds *buf);
|
||||
|
||||
/**
|
||||
* \brief `msgsnd` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 msgsnd @endverbatim
|
||||
*
|
||||
* @see https://man.cx/msgsnd(2)
|
||||
*/
|
||||
void pmsgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg);
|
||||
|
||||
/**
|
||||
* \brief `msgrcv` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 2 msgrcv @endverbatim
|
||||
*
|
||||
* @see https://man.cx/msgrcv(2)
|
||||
*/
|
||||
size_t pmsgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name POSIX semaphores
|
||||
* @anchor posix_sem @{
|
||||
*/
|
||||
|
||||
// named:
|
||||
/**
|
||||
* \brief `sem_open` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 sem_open @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sem_open(3)
|
||||
*/
|
||||
sem_t *psem_open(const char *name, int oflag);
|
||||
sem_t *psem_open(const char *name, int oflag, mode_t mode, unsigned int value);
|
||||
|
||||
/**
|
||||
* \brief `sem_close` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>sem != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 sem_close @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sem_close(3)
|
||||
*/
|
||||
void psem_close(sem_t *sem);
|
||||
|
||||
/**
|
||||
* \brief `sem_unlink` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 sem_unlink @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sem_unlink(3)
|
||||
*/
|
||||
void psem_unlink(const char *name);
|
||||
|
||||
// unnamed:
|
||||
/**
|
||||
* \brief `sem_init` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>sem != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 sem_init @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sem_init(3)
|
||||
*/
|
||||
void psem_init(sem_t *sem, int pshared, unsigned int value);
|
||||
|
||||
/**
|
||||
* \brief `sem_destroy` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>sem != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 sem_destroy @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sem_destroy(3)
|
||||
*/
|
||||
void psem_destroy(sem_t *sem);
|
||||
|
||||
// named and unnamed:
|
||||
/**
|
||||
* \brief `sem_wait` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>sem != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 sem_wait @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sem_wait(3)
|
||||
*/
|
||||
void psem_wait(sem_t *sem);
|
||||
|
||||
/**
|
||||
* \brief `sem_trywait` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>sem != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 sem_trywait @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sem_trywait(3)
|
||||
*
|
||||
* \return true (`!=0`) on success, false (`0`) if semaphore is zero
|
||||
*/
|
||||
int psem_trywait(sem_t *sem);
|
||||
|
||||
/**
|
||||
* \brief `sem_timedwait` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>sem != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 sem_timedwait @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sem_timedwait(3)
|
||||
*
|
||||
* \return true (`!=0`) on success, false (`0`) if timeout has expired before being able to decrement the semaphore
|
||||
*/
|
||||
int psem_timedwait(sem_t *sem, const struct timespec *abs_timeout);
|
||||
|
||||
/**
|
||||
* \brief `sem_post` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>sem != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 sem_post @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sem_post(3)
|
||||
*/
|
||||
void psem_post(sem_t *sem);
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @name UNIX pipes
|
||||
* @anchor pipes @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `pipe` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pipe @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pipe
|
||||
*/
|
||||
void ppipe(int pipefd[2]);
|
||||
|
||||
/**
|
||||
* \brief `popen` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>command != NULL</code></DD>
|
||||
* <DD><code>type != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 popen @endverbatim
|
||||
*
|
||||
* @see https://man.cx/popen
|
||||
*/
|
||||
FILE *ppopen(const char *command, const char *type);
|
||||
|
||||
/**
|
||||
* \brief `pclose` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>stream != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pclose @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pclose
|
||||
*/
|
||||
void ppclose(FILE *stream);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* ************************************************** */
|
||||
/**
|
||||
* @} close group process
|
||||
**/
|
||||
/* ************************************************** */
|
||||
|
|
@ -1,665 +0,0 @@
|
|||
/**
|
||||
* \defgroup thread thread
|
||||
* \ingroup concurrency-library
|
||||
* \brief POSIX threads library wrapper module.
|
||||
*
|
||||
* \details This module removes defensive programming approach of native POSIX threads library.
|
||||
*
|
||||
* All implemented functions, have exactly the same arguments and/or result of the original function,
|
||||
* with the exception of returning an error indication.
|
||||
*
|
||||
* Errors are handled by the implementation of two policies:
|
||||
* -# EXIT_POLICY (default): describes the failed call in `stderr` (with the identification
|
||||
* of the errno error, and the precise location the call), generates a segmentation fault
|
||||
* (enabling a stack trace within a debugger like `gdb`), and exits program execution;
|
||||
* -# EXCEPTION_POLICY: throws a `int` exception with the (errno) status error returned by the original function.
|
||||
*
|
||||
* \author Miguel Oliveira e Silva, 2017-2018
|
||||
*
|
||||
* @{
|
||||
**/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief POSIX threads library wrapper module.
|
||||
* \remarks Removes defensive programming from native libraries
|
||||
**/
|
||||
|
||||
#ifndef THREAD_H
|
||||
#define THREAD_H
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
//#define EXCEPTION_POLICY
|
||||
//#define EXIT_POLICY // DEFAULT
|
||||
|
||||
/** @name Thread handling
|
||||
*
|
||||
* @details
|
||||
*
|
||||
* Variable type: `pthread_t`
|
||||
*
|
||||
* @anchor thread @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `pthread_equal` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_equal @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_equal(3)
|
||||
*/
|
||||
int thread_equal(pthread_t t1, pthread_t t2);
|
||||
|
||||
/**
|
||||
* \brief `pthread_create` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>t != NULL</code></DD><BR>
|
||||
* <DD><code>thread_main != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_create @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_create(3)
|
||||
*/
|
||||
void thread_create(pthread_t* t, pthread_attr_t* attr, void *(*thread_main)(void*), void* arg);
|
||||
|
||||
/**
|
||||
* \brief `pthread_self` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_self @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_self(3)
|
||||
*/
|
||||
pthread_t thread_self();
|
||||
|
||||
/**
|
||||
* \brief `sched_yield` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 sched_yield @endverbatim
|
||||
*
|
||||
* @see https://man.cx/sched_yield(3)
|
||||
*/
|
||||
void thread_sched_yield(void);
|
||||
|
||||
/**
|
||||
* \brief `pthread_exit` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_exit @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_exit(3)
|
||||
*/
|
||||
void thread_exit(void *retval);
|
||||
|
||||
/**
|
||||
* \brief `pthread_detach` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_detach @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_detach(3)
|
||||
*/
|
||||
void thread_detach(pthread_t thread);
|
||||
|
||||
/**
|
||||
* \brief `pthread_join` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_join @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_join(3)
|
||||
*/
|
||||
void thread_join(pthread_t t, void** result);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name Mutexes
|
||||
*
|
||||
* @details
|
||||
*
|
||||
* Variable type: `pthread_mutex_t`
|
||||
*
|
||||
* Initialization of mutexes can be static or dynamic.
|
||||
*
|
||||
* In static initialization the following initialization macros are suggested:
|
||||
* - `PTHREAD_MUTEX_INITIALIZER` - standard initializer
|
||||
* - `PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP` - initializer that ensures error checking
|
||||
* - `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP` - for recursive mutexes (note that recursive mutexes should be avoid)
|
||||
*
|
||||
* Dynamic initialization is done by mutex_init() and mutex_destroy().
|
||||
*
|
||||
* @anchor mutex @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `pthread_mutex_init` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pmtx != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_mutex_init @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_mutex_init(3)
|
||||
*/
|
||||
void mutex_init(pthread_mutex_t* pmtx, pthread_mutexattr_t* attr);
|
||||
|
||||
/**
|
||||
* \brief `pthread_mutex_destroy` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pmtx != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_mutex_destroy @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_mutex_destroy(3)
|
||||
*/
|
||||
void mutex_destroy(pthread_mutex_t* pmtx);
|
||||
|
||||
/**
|
||||
* \brief `pthread_mutex_lock` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pmtx != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_mutex_lock @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_mutex_lock(3)
|
||||
*/
|
||||
void mutex_lock(pthread_mutex_t* pmtx);
|
||||
|
||||
/**
|
||||
* \brief `pthread_mutex_trylock` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pmtx != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_mutex_trylock @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_mutex_trylock(3)
|
||||
*
|
||||
* \return true (`!=0`) if lock succeeds, false (`0`) otherwise
|
||||
*/
|
||||
int mutex_trylock(pthread_mutex_t* pmtx);
|
||||
|
||||
/**
|
||||
* \brief `pthread_mutex_unlock` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pmtx != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_mutex_unlock @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_mutex_unlock(3)
|
||||
*/
|
||||
void mutex_unlock(pthread_mutex_t* pmtx);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name Condition variables
|
||||
*
|
||||
* @details
|
||||
*
|
||||
* Variable type: `pthread_cond_t`
|
||||
*
|
||||
* Initialization of condition variables can be static or dynamic.
|
||||
*
|
||||
* In static initialization the following initialization macros should be used:
|
||||
* - `PTHREAD_COND_INITIALIZER` - standard initializer
|
||||
*
|
||||
* Dynamic initialization is done by cond_init() and cond_destroy().
|
||||
*
|
||||
* @anchor cvar @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `pthread_cond_init` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pcvar != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_cond_init @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_cond_init(3)
|
||||
*/
|
||||
void cond_init(pthread_cond_t* pcvar, pthread_condattr_t* attr);
|
||||
|
||||
/**
|
||||
* \brief `pthread_cond_destroy` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pcvar != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_cond_destroy @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_cond_destroy(3)
|
||||
*/
|
||||
void cond_destroy(pthread_cond_t* pcvar);
|
||||
|
||||
/**
|
||||
* \brief `pthread_cond_wait` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pcvar != NULL</code></DD><BR>
|
||||
* <DD><code>pmtx != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_cond_wait @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_cond_wait(3)
|
||||
*/
|
||||
void cond_wait(pthread_cond_t* pcvar, pthread_mutex_t* pmtx);
|
||||
|
||||
/**
|
||||
* \brief `pthread_cond_timedwait` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pcvar != NULL</code></DD><BR>
|
||||
* <DD><code>pmtx != NULL</code></DD><BR>
|
||||
* <DD><code>abstime != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return true (`!=0`) if condition variable was signaled, false (`0`) it time out has expired.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_cond_timedwait @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_cond_wait(3)
|
||||
*/
|
||||
int cond_timedwait(pthread_cond_t* pcvar, pthread_mutex_t* pmtx, const struct timespec *abstime);
|
||||
|
||||
/**
|
||||
* \brief `pthread_cond_timedwait` wrapper function accepting relative time (in microseconds) instead of absolute time.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pcvar != NULL</code></DD><BR>
|
||||
* <DD><code>pmtx != NULL</code></DD><BR>
|
||||
* <DD><code>relative_time_us > 0L</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return true (`!=0`) if condition variable was signaled, false (`0`) it time out has expired.
|
||||
*
|
||||
* \details Documentation in @verbatim man 3 pthread_cond_timedwait @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_cond_wait(3)
|
||||
*/
|
||||
int cond_timedwait(pthread_cond_t* pcvar, pthread_mutex_t* pmtx, long relative_time_us);
|
||||
|
||||
/**
|
||||
* \brief `pthread_cond_signal` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pcvar != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_cond_signal @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_cond_signal(3)
|
||||
*/
|
||||
void cond_signal(pthread_cond_t* pcvar);
|
||||
|
||||
/**
|
||||
* \brief `pthread_cond_broadcast` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pcvar != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_cond_broadcast @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_cond_broadcast(3)
|
||||
*/
|
||||
void cond_broadcast(pthread_cond_t* pcvar);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name One-time initialization
|
||||
*
|
||||
* @details
|
||||
*
|
||||
* Variable type: `pthread_once_t`
|
||||
*
|
||||
* POSIX thread library support a mechanism that ensures a one-time execution of a function.
|
||||
* It does it through `pthread_once_t` variables, and by passing a callback function
|
||||
* (in C/C++ is simply a function pointer).
|
||||
*
|
||||
* \par <b>Example</b>
|
||||
* @verbatim
|
||||
void once_init_routine(void) { ... }
|
||||
...
|
||||
pthread_once_t once_control = PTHREAD_ONCE_INIT;
|
||||
thread_once(&once_control, &once_init_routine); // one time execution over pthread_once_t
|
||||
// variable is guaranteed, regardless of the
|
||||
// number of threads that execute over that
|
||||
// variable.
|
||||
@endverbatim
|
||||
*
|
||||
* @anchor thread_once @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `pthread_once` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>once_control != NULL</code></DD><BR>
|
||||
* <DD><code>init_routine != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_once @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_once(3)
|
||||
*/
|
||||
void thread_once(pthread_once_t *once_control, void (*init_routine) (void));
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name Thread-specific data
|
||||
*
|
||||
* @details
|
||||
*
|
||||
* Variable type: `pthread_key_t`
|
||||
*
|
||||
* Thread-specific data allows the definition of variable whose scope is limited to each thread.
|
||||
* In practice, we will have a common variable, with a common access, but with different values for each thread.
|
||||
*
|
||||
* @anchor thread_specific @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `pthread_key_create` wrapper function.
|
||||
*
|
||||
* \details This function should be executed once for each key (use thread_once()).
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>key != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_key_create @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_key_create(3)
|
||||
*/
|
||||
void thread_key_create(pthread_key_t *key, void (*destr_function) (void *));
|
||||
|
||||
/**
|
||||
* \brief `pthread_key_delete` wrapper function.
|
||||
*
|
||||
* \details This function should be executed once for each key (use thread_once()).
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>key != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_key_delete @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_key_delete(3)
|
||||
*/
|
||||
void thread_key_delete(pthread_key_t key);
|
||||
|
||||
/**
|
||||
* \brief `pthread_setspecific` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pointer != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_setspecific @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_setspecific(3)
|
||||
*/
|
||||
void thread_setspecific(pthread_key_t key, void* pointer);
|
||||
|
||||
/**
|
||||
* \brief `pthread_getspecific` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>key != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_getspecific @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_getspecific(3)
|
||||
*/
|
||||
void* thread_getspecific(pthread_key_t key);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name Mutex attributes
|
||||
*
|
||||
* @details
|
||||
*
|
||||
* Variable type: `pthread_mutexattr_t`
|
||||
*
|
||||
* @anchor mutex_attr @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `pthread_mutexattr_init` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>attr != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_mutexattr_init @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_mutexattr_init(3)
|
||||
*/
|
||||
void mutexattr_init(pthread_mutexattr_t *attr);
|
||||
|
||||
/**
|
||||
* \brief `pthread_mutexattr_destroy` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>attr != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_mutexattr_destroy @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_mutexattr_destroy(3)
|
||||
*/
|
||||
void mutexattr_destroy(pthread_mutexattr_t *attr);
|
||||
|
||||
/**
|
||||
* \brief `pthread_mutexattr_settype` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>attr != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_mutexattr_settype @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_mutexattr_settype(3)
|
||||
*/
|
||||
void mutexattr_settype(pthread_mutexattr_t *attr, int type);
|
||||
|
||||
/**
|
||||
* \brief `pthread_mutexattr_gettype` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>attr != NULL</code></DD><BR>
|
||||
* <DD><code>kind != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_mutexattr_gettype @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_mutexattr_gettype(3)
|
||||
*/
|
||||
void mutexattr_gettype(const pthread_mutexattr_t *attr, int *kind);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name Condition variables attributes
|
||||
*
|
||||
* @details
|
||||
*
|
||||
* Variable type: `pthread_condattr_t`
|
||||
*
|
||||
* @anchor cond_attr @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `pthread_condattr_init` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>attr != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_condattr_init @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_condattr_init(3)
|
||||
*/
|
||||
void condattr_init(pthread_condattr_t *attr);
|
||||
|
||||
/**
|
||||
* \brief `pthread_condattr_destroy` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>attr != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_condattr_destroy @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_condattr_destroy(3)
|
||||
*/
|
||||
void condattr_destroy(pthread_condattr_t *attr);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name Thread attributes
|
||||
*
|
||||
* @details
|
||||
*
|
||||
* Variable type: `pthread_attr_t`
|
||||
*
|
||||
* @anchor thread_attr @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `pthread_attr_init` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>attr != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_attr_init @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_attr_init(3)
|
||||
*/
|
||||
void thread_attr_init(pthread_attr_t *attr);
|
||||
|
||||
/**
|
||||
* \brief `pthread_attr_destroy` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>attr != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_attr_destroy @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_attr_destroy(3)
|
||||
*/
|
||||
void thread_attr_destroy(pthread_attr_t *attr);
|
||||
|
||||
/**
|
||||
* \brief `pthread_attr_setdetachstate` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>attr != NULL</code></DD><BR>
|
||||
* <DD><code>detachstate == PTHREAD_CREATE_DETACHED || detachstate == PTHREAD_CREATE_JOINABLE</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_attr_setdetachstate @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_attr_setdetachstate(3)
|
||||
*/
|
||||
void thread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);
|
||||
|
||||
/**
|
||||
* \brief `pthread_attr_getdetachstate` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>attr != NULL</code></DD><BR>
|
||||
* <DD><code>pdetachstate != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_attr_getdetachstate @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_attr_getdetachstate(3)
|
||||
*/
|
||||
void thread_attr_getdetachstate(const pthread_attr_t *attr, int *pdetachstate);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
/** @name Cancellation
|
||||
*
|
||||
* @anchor thread_cancellation @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief `pthread_cancel` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_cancel @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_cancel(3)
|
||||
*/
|
||||
void thread_cancel(pthread_t thread);
|
||||
|
||||
/**
|
||||
* \brief `pthread_setcancelstate` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>state == PTHREAD_CANCEL_ENABLE || state == PTHREAD_CANCEL_DISABLE</code></DD><BR>
|
||||
* <DD><code>oldstate != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_setcancelstate @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_setcancelstate(3)
|
||||
*/
|
||||
void thread_setcancelstate(int state, int *oldstate);
|
||||
|
||||
/**
|
||||
* \brief `pthread_setcanceltype` wrapper function.
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>type == PTHREAD_CANCEL_DEFERRED || type == PTHREAD_CANCEL_ASYNCHRONOUS</code></DD><BR>
|
||||
* <DD><code>oldtype != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_setcanceltype @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_setcanceltype(3)
|
||||
*/
|
||||
void thread_setcanceltype(int type, int *oldtype);
|
||||
|
||||
/**
|
||||
* \brief `pthread_testcancel` wrapper function.
|
||||
*
|
||||
* \details Other documentation in @verbatim man 3 pthread_testcancel @endverbatim
|
||||
*
|
||||
* @see https://man.cx/pthread_testcancel(3)
|
||||
*/
|
||||
void thread_testcancel(void);
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
|
||||
/* ************************************************** */
|
||||
/**
|
||||
* @} close group thread
|
||||
**/
|
||||
/* ************************************************** */
|
||||
|
|
@ -1,658 +0,0 @@
|
|||
/**
|
||||
* \defgroup utils utils
|
||||
* \ingroup concurrency-library
|
||||
* \brief Useful common functions and macros.
|
||||
* \author Miguel Oliveira e Silva, 2017-2018
|
||||
* @{
|
||||
**/
|
||||
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief Useful common functions and macros.
|
||||
**/
|
||||
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "dbc.h"
|
||||
|
||||
/** @name String concatenation in stack memory
|
||||
* @anchor concat @{
|
||||
*/
|
||||
/**
|
||||
* \brief Concatenates two strings in the stack memory (thus it cannot be implemented in a function).
|
||||
*
|
||||
* \details A `NULL` reference is treated as an empty string.
|
||||
*
|
||||
* \param [in] str1 string 1
|
||||
* \param [in] str2 string 2
|
||||
*
|
||||
* \return the concatenated string
|
||||
*/
|
||||
#define concat_2str(str1,str2) \
|
||||
({ \
|
||||
char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \
|
||||
char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \
|
||||
char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+1); \
|
||||
strcpy(__res__, s1); \
|
||||
strcat(__res__, s2); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \brief Concatenates three strings in the stack memory (thus it cannot be implemented in a function).
|
||||
*
|
||||
* \details A `NULL` reference is treated as an empty string.
|
||||
*
|
||||
* \param [in] str1 string 1
|
||||
* \param [in] str2 string 2
|
||||
* \param [in] str3 string 3
|
||||
*
|
||||
* \return the concatenated string
|
||||
*/
|
||||
#define concat_3str(str1,str2,str3) \
|
||||
({ \
|
||||
char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \
|
||||
char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \
|
||||
char* s3 = (str3) == NULL ? (char*)"" : (char*)(str3); \
|
||||
char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+strlen(s3)+1); \
|
||||
strcpy(__res__, s1); \
|
||||
strcat(__res__, s2); \
|
||||
strcat(__res__, s3); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \brief Concatenates four strings in the stack memory (thus it cannot be implemented in a function).
|
||||
*
|
||||
* \details A `NULL` reference is treated as an empty string.
|
||||
*
|
||||
* \param [in] str1 string 1
|
||||
* \param [in] str2 string 2
|
||||
* \param [in] str3 string 3
|
||||
* \param [in] str4 string 4
|
||||
*
|
||||
* \return the concatenated string
|
||||
*/
|
||||
#define concat_4str(str1,str2,str3,str4) \
|
||||
({ \
|
||||
char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \
|
||||
char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \
|
||||
char* s3 = (str3) == NULL ? (char*)"" : (char*)(str3); \
|
||||
char* s4 = (str4) == NULL ? (char*)"" : (char*)(str4); \
|
||||
char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+strlen(s3)+strlen(s4)+1); \
|
||||
strcpy(__res__, s1); \
|
||||
strcat(__res__, s2); \
|
||||
strcat(__res__, s3); \
|
||||
strcat(__res__, s4); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \brief Concatenates five strings in the stack memory (thus it cannot be implemented in a function).
|
||||
*
|
||||
* \details A `NULL` reference is treated as an empty string.
|
||||
*
|
||||
* \param [in] str1 string 1
|
||||
* \param [in] str2 string 2
|
||||
* \param [in] str3 string 3
|
||||
* \param [in] str4 string 4
|
||||
* \param [in] str5 string 5
|
||||
*
|
||||
* \return the concatenated string
|
||||
*/
|
||||
#define concat_5str(str1,str2,str3,str4,str5) \
|
||||
({ \
|
||||
char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \
|
||||
char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \
|
||||
char* s3 = (str3) == NULL ? (char*)"" : (char*)(str3); \
|
||||
char* s4 = (str4) == NULL ? (char*)"" : (char*)(str4); \
|
||||
char* s5 = (str5) == NULL ? (char*)"" : (char*)(str5); \
|
||||
char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+strlen(s3)+strlen(s4)+strlen(s5)+1); \
|
||||
strcpy(__res__, s1); \
|
||||
strcat(__res__, s2); \
|
||||
strcat(__res__, s3); \
|
||||
strcat(__res__, s4); \
|
||||
strcat(__res__, s5); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \brief Concatenates six strings in the stack memory (thus it cannot be implemented in a function).
|
||||
*
|
||||
* \details A `NULL` reference is treated as an empty string.
|
||||
*
|
||||
* \param [in] str1 string 1
|
||||
* \param [in] str2 string 2
|
||||
* \param [in] str3 string 3
|
||||
* \param [in] str4 string 4
|
||||
* \param [in] str5 string 5
|
||||
* \param [in] str6 string 6
|
||||
*
|
||||
* \return the concatenated string
|
||||
*/
|
||||
#define concat_6str(str1,str2,str3,str4,str5,str6) \
|
||||
({ \
|
||||
char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \
|
||||
char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \
|
||||
char* s3 = (str3) == NULL ? (char*)"" : (char*)(str3); \
|
||||
char* s4 = (str4) == NULL ? (char*)"" : (char*)(str4); \
|
||||
char* s5 = (str5) == NULL ? (char*)"" : (char*)(str5); \
|
||||
char* s6 = (str6) == NULL ? (char*)"" : (char*)(str6); \
|
||||
char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+strlen(s3)+strlen(s4)+strlen(s5)+strlen(s6)+1); \
|
||||
strcpy(__res__, s1); \
|
||||
strcat(__res__, s2); \
|
||||
strcat(__res__, s3); \
|
||||
strcat(__res__, s4); \
|
||||
strcat(__res__, s5); \
|
||||
strcat(__res__, s6); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \brief Concatenates seven strings in the stack memory (thus it cannot be implemented in a function).
|
||||
*
|
||||
* \details A `NULL` reference is treated as an empty string.
|
||||
*
|
||||
* \param [in] str1 string 1
|
||||
* \param [in] str2 string 2
|
||||
* \param [in] str3 string 3
|
||||
* \param [in] str4 string 4
|
||||
* \param [in] str5 string 5
|
||||
* \param [in] str6 string 6
|
||||
* \param [in] str7 string 7
|
||||
*
|
||||
* \return the concatenated string
|
||||
*/
|
||||
#define concat_7str(str1,str2,str3,str4,str5,str6,str7) \
|
||||
({ \
|
||||
char* s1 = (str1) == NULL ? (char*)"" : (char*)(str1); \
|
||||
char* s2 = (str2) == NULL ? (char*)"" : (char*)(str2); \
|
||||
char* s3 = (str3) == NULL ? (char*)"" : (char*)(str3); \
|
||||
char* s4 = (str4) == NULL ? (char*)"" : (char*)(str4); \
|
||||
char* s5 = (str5) == NULL ? (char*)"" : (char*)(str5); \
|
||||
char* s6 = (str6) == NULL ? (char*)"" : (char*)(str6); \
|
||||
char* s7 = (str7) == NULL ? (char*)"" : (char*)(str7); \
|
||||
char* __res__ = (char*)alloca(strlen(s1)+strlen(s2)+strlen(s3)+strlen(s4)+strlen(s5)+strlen(s6)+strlen(s7)+1); \
|
||||
strcpy(__res__, s1); \
|
||||
strcat(__res__, s2); \
|
||||
strcat(__res__, s3); \
|
||||
strcat(__res__, s4); \
|
||||
strcat(__res__, s5); \
|
||||
strcat(__res__, s6); \
|
||||
strcat(__res__, s7); \
|
||||
__res__; \
|
||||
})
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \brief Converts an `int` value to a stack allocated string.
|
||||
*
|
||||
* \param [in] num integer number
|
||||
*
|
||||
* \return the converted string
|
||||
*/
|
||||
#define int2str(num) \
|
||||
({ \
|
||||
char* __res__ = (char*)alloca(numDigits((int)num)+1); \
|
||||
sprintf(__res__, "%d", (int)num); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \brief Converts an `int` value to a stack allocated string.
|
||||
*
|
||||
* \details If necessary, fills the result string with left zeros.
|
||||
*
|
||||
* \param [in] num integer number
|
||||
* \param [in] len minimum length of result string
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>len > 0</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return the converted string
|
||||
*/
|
||||
#define int2nstr(num, len) \
|
||||
({ \
|
||||
require (len > 0, concat_3str("invalid length value (", int2str(len), ")")); \
|
||||
int d = numDigits((int)num); \
|
||||
if (len > d) \
|
||||
d = len; \
|
||||
char* __res__ = (char*)alloca(d+1); \
|
||||
sprintf(__res__, "%0*d", d, (int)num); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \brief Converts an `long` value to a stack allocated string.
|
||||
*
|
||||
* \param [in] num long integer number
|
||||
*
|
||||
* \return the converted string
|
||||
*/
|
||||
#define long2str(num) \
|
||||
({ \
|
||||
char* __res__ = (char*)alloca(numDigits((long)num)+1); \
|
||||
sprintf(__res__, "%ld", (long)num); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \brief Converts an `long` value to a stack allocated string.
|
||||
*
|
||||
* \details If necessary, fills the result string with left zeros.
|
||||
*
|
||||
* \param [in] num long integer number
|
||||
* \param [in] len minimum length of result string
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>len > 0</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return the converted string
|
||||
*/
|
||||
#define long2nstr(num, len) \
|
||||
({ \
|
||||
require (len > 0, concat_3str("invalid length value (", int2str(len), ")")); \
|
||||
int d = numDigits((int)num); \
|
||||
if (len > d) \
|
||||
d = len; \
|
||||
char* __res__ = (char*)alloca(d+1); \
|
||||
sprintf(__res__, "%0*ld", d, (long)num); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \brief Converts an `int` percentage to a stack allocated string.
|
||||
*
|
||||
* \param [in] percentage an integer number with a percentage value
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>percentage >= 0 && percentage <= 100</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return the converted string
|
||||
*/
|
||||
#define perc2str(percentage) \
|
||||
({ \
|
||||
require (percentage >= 0 && percentage <= 100, concat_3str("invalid percentage value (", int2str(percentage), ")")); \
|
||||
char* __res__ = (char*)alloca(4+1); \
|
||||
sprintf(__res__, "%3d%%", (int)percentage); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
/**
|
||||
* \brief Determines the length of all strings passed as a NULL terminated variable list of arguments (vargs).
|
||||
*
|
||||
* \param [in] first the argument that precedes the vargs argument list.
|
||||
*
|
||||
* \return the sum of the length of all strings (not counting terminator `'\0'`)
|
||||
*/
|
||||
#define length_vargs_string_list(first) \
|
||||
({ \
|
||||
int __res__ = 0; \
|
||||
va_list ap; \
|
||||
va_start(ap, first); \
|
||||
char* t = first; \
|
||||
while (t != NULL) \
|
||||
{ \
|
||||
__res__ += strlen(t); \
|
||||
t = va_arg(ap, char*); \
|
||||
} \
|
||||
va_end(ap); \
|
||||
__res__; \
|
||||
})
|
||||
|
||||
#if defined __cplusplus && defined EXCEPTION_POLICY
|
||||
#define not_null(pnt) \
|
||||
({ \
|
||||
if ((pnt) == NULL) \
|
||||
throw string_concat(NULL, 0, (char*)"Null pointer error", (char*)", pointer: \"", #pnt, (char*)"\", function: \"", __FUNCTION__, (char*)"\":", int2str(__LINE__), (char*)", file: \"", __FILE__, (char*)"\"\n", NULL); \
|
||||
pnt; \
|
||||
})
|
||||
#else
|
||||
/**
|
||||
* \brief Checks if address is not `NULL`, before its application.
|
||||
*
|
||||
* \details This macro is a non-defensive implementation of a null pointer verification.
|
||||
* It implements two error handling policies:
|
||||
* - EXIT_POLICY (default): describes the error in `stderr` (with the identification
|
||||
* and the precise location of the failure), generates a segmentation fault
|
||||
* (enabling a stack trace within a debugger like `gdb`), and exits program execution;
|
||||
* - EXCEPTION_POLICY: throws a `char*` exception with the description of the failure.
|
||||
*
|
||||
* \par <b>Example</b>
|
||||
* @skipline\code
|
||||
* not_null(pnt)->something();
|
||||
* \endcode
|
||||
*
|
||||
* \param [in] pnt memory address
|
||||
*/
|
||||
#define not_null(pnt) \
|
||||
({ \
|
||||
if ((pnt) == NULL) \
|
||||
{ \
|
||||
fprintf (stderr, "Null pointer error, pointer: \"%s\", function: \"%s\":%d, file: \"%s\"\n", \
|
||||
#pnt, __FUNCTION__, __LINE__ , __FILE__); \
|
||||
*((int*)0) = 0; \
|
||||
abort (); \
|
||||
} \
|
||||
pnt; \
|
||||
})
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A replacement for `malloc` function.
|
||||
*
|
||||
* \details This function is a non-defensive implementation of `malloc` error verification.
|
||||
* It implements two error handling policies:
|
||||
* - EXIT_POLICY (default): describes the error in `stderr` (with the identification
|
||||
* and the precise location of the failure), generates a segmentation fault
|
||||
* (enabling a stack trace within a debugger like `gdb`), and exits program execution;
|
||||
* - EXCEPTION_POLICY: throws a `char*` exception with the description of the failure.
|
||||
*
|
||||
* \param [in] size number of bytes to be allocated
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>size >= 0</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return address of the allocated memory
|
||||
*/
|
||||
void* mem_alloc(int size);
|
||||
|
||||
/**
|
||||
* \brief A replacement for `free` function.
|
||||
*
|
||||
* \param [in] pnt memory address to be freed
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>pnt != NULL</code></DD>
|
||||
* </DL>
|
||||
*/
|
||||
void mem_free(void* pnt);
|
||||
|
||||
/**
|
||||
* \brief Replicates a string.
|
||||
*
|
||||
* \details The memory is allocated in the heap (using mem_alloc()).
|
||||
*
|
||||
* \param [in] str string to be replicated
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>str != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return pointer to the replicated string
|
||||
*/
|
||||
char* string_clone(char* str);
|
||||
|
||||
/**
|
||||
* \brief Number of lines of a string.
|
||||
*
|
||||
* \param [in] text string text to process
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>text != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return number of counted lines
|
||||
*/
|
||||
int string_num_lines(char* text);
|
||||
|
||||
/**
|
||||
* \brief Maximum number of columns of a string (not counting character `'\\n'`).
|
||||
*
|
||||
* \param [in] text string text to process
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>text != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return maximum number of counted columns
|
||||
*/
|
||||
int string_num_columns(char* text);
|
||||
|
||||
/**
|
||||
* \brief Counts the number of occurrences of an UTF8 character in a text.
|
||||
*
|
||||
* \param [in] text string text to process
|
||||
* \param [in] ch string containing the sequence of bytes (one or more) of an UTF8 single character
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>text != NULL</code></DD><BR>
|
||||
* <DD><code>ch != NULL && num_chars_utf8(ch) == 1</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return number of counted occurrences
|
||||
*/
|
||||
int string_count_char(char* text, char* ch);
|
||||
|
||||
/**
|
||||
* \brief Tests if a string starts with a prefix.
|
||||
*
|
||||
* \param [in] text string text to process
|
||||
* \param [in] prefix string to test if is a prefix
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>text != NULL</code></DD><BR>
|
||||
* <DD><code>prefix != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return true (`!=0`) if prefix starts text, false (`0`) otherwise
|
||||
*/
|
||||
int string_starts_with(char* text, char* prefix);
|
||||
|
||||
/**
|
||||
* \brief Tests if a string ends with a suffix.
|
||||
*
|
||||
* \param [in] text string text to process
|
||||
* \param [in] suffix string to test if is a suffix
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>text != NULL</code></DD><BR>
|
||||
* <DD><code>suffix != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return true (`!=0`) if suffix ends text, false (`0`) otherwise
|
||||
*/
|
||||
int string_ends_with(char* text, char* suffix);
|
||||
|
||||
/**
|
||||
* \brief Concatenates a `NULL` terminated list of string arguments.
|
||||
*
|
||||
* \details
|
||||
* This function treats all vargs arguments as strings (`char*`),
|
||||
* and requires that the list is terminated with a NULL argument.
|
||||
*
|
||||
* It allocates memory in heap (using mem_alloc()) if `NULL`
|
||||
* is passed in the `res` argument.
|
||||
*
|
||||
* \param [in,out] res address of result string (if not `NULL`)
|
||||
* \param [in] max_length `res` input argument maximum length (not counting terminator `'\0'`), only applies if `(res != NULL)`
|
||||
* \param [in] text the first string to be used in concatenation
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>text != NULL</code></DD><BR>
|
||||
* <DD><code>res == NULL || (max_length > 0 && length_vargs_string_list(text) <= max_length)</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return the concatenated string
|
||||
*/
|
||||
char* string_concat(char* res, int max_length, char* text, ...);
|
||||
|
||||
/**
|
||||
* \brief Generates a random boolean value.
|
||||
*
|
||||
* \details
|
||||
* This function generates boolean values with defined probabilities
|
||||
* for true (`!=0`) and false (`0`) values.
|
||||
*
|
||||
* \param [in] trueProb probability (in interval `[0;100]`).
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>trueProb >= 0 && trueProb <= 100</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return the random boolean value
|
||||
*/
|
||||
int random_boolean(int trueProb);
|
||||
|
||||
/**
|
||||
* \brief Generates a random integer value within a given interval.
|
||||
*
|
||||
* \details
|
||||
* This function generates integer values in the interval `[min;max]`with an uniform distribution for all values.
|
||||
*
|
||||
* \param [in] min lower value of interval
|
||||
* \param [in] max higher value of interval
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>max >= min</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return the random integer value
|
||||
*/
|
||||
int random_int(int min, int max);
|
||||
|
||||
/**
|
||||
* \brief Returns a random string from a given string list.
|
||||
*
|
||||
* \details
|
||||
* This function stores the previous randomly selected string's (using the integer indexes of the string list)
|
||||
* to disallow its repeated generation.
|
||||
*
|
||||
* \param [in] list list of strings to be selected (`NULL` terminated)
|
||||
* \param [in,out] used indexes of strings already selected
|
||||
* \param [in] length number of elements of lists `list` (not counting `NULL` entry) and `used`
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>list != NULL</code></DD><BR>
|
||||
* <DD><code>used != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return the random string
|
||||
*/
|
||||
char* random_string(char** list, int* used, int length);
|
||||
|
||||
/**
|
||||
* \brief Clears the terminal.
|
||||
*/
|
||||
void clear_console();
|
||||
|
||||
/**
|
||||
* \brief Moves the cursor to a position in terminal.
|
||||
*
|
||||
* \param [in] line position in the terminal
|
||||
* \param [in] column position in the terminal
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>line >= 0 && column >= 0</code></DD>
|
||||
* </DL>
|
||||
*/
|
||||
void move_cursor(int line,int column);
|
||||
|
||||
/**
|
||||
* \brief Hides the terminal cursor.
|
||||
*/
|
||||
void hide_cursor();
|
||||
|
||||
/**
|
||||
* \brief Shows the terminal cursor.
|
||||
*/
|
||||
void show_cursor();
|
||||
|
||||
/**
|
||||
* \brief Number of elements of a `NULL` terminated list of strings.
|
||||
*
|
||||
* \param [in] list `NULL` terminated array of strings
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>list != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return number of elements of list (not counting `NULL`)
|
||||
*/
|
||||
int string_list_length(char** list);
|
||||
|
||||
/**
|
||||
* \brief Replicates a `NULL` terminated list of strings.
|
||||
*
|
||||
* \details The memory is allocated in the heap (using mem_alloc()).
|
||||
*
|
||||
* \param [in] list `NULL` terminated array of strings
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>list != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return pointer to the replicated list
|
||||
*/
|
||||
char** string_list_clone(char** list);
|
||||
|
||||
/**
|
||||
* \brief Frees the memory allocated to a `NULL` terminated list of strings.
|
||||
*
|
||||
* \details This function is totally compatible with string_list_clone(), and always returns `NULL`.
|
||||
*
|
||||
* \param [in] list `NULL` terminated array of strings
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>list != NULL</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return `NULL`
|
||||
*/
|
||||
char** string_list_free(char** list);
|
||||
|
||||
int numDigits(int num);
|
||||
|
||||
/**
|
||||
* \brief Converts an `int` value to a string.
|
||||
*
|
||||
* \details If necessary, fills the result string with left zeros.
|
||||
* It allocates memory in heap (using mem_alloc()) if `NULL`
|
||||
* is passed in the `res` argument.
|
||||
*
|
||||
* \param [in,out] res address of result string (if not `NULL`)
|
||||
* \param [in] num integer number
|
||||
* \param [in] len minimum length of result string (not counting terminator `'\0'`)
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>len >= numDigits(num)</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return the converted string
|
||||
*/
|
||||
char* int2nstring(char* res, int num, int len);
|
||||
|
||||
/**
|
||||
* \brief Converts an `int` percentage to a string.
|
||||
*
|
||||
* \details It allocates memory in heap (using mem_alloc()) if `NULL`
|
||||
* is passed in the `res` argument.
|
||||
*
|
||||
* \param [in,out] res address of result string (if not `NULL`)
|
||||
* \param [in] percentage an integer number with a percentage value
|
||||
*
|
||||
* <DL><DT><B>Precondition:</B></DT>
|
||||
* <DD><code>percentage >= 0 && percentage <= 100</code></DD>
|
||||
* </DL>
|
||||
*
|
||||
* \return the converted string (if not `NULL`, it returns `res`)
|
||||
*/
|
||||
char* percentage2string(char* res, int percentage);
|
||||
|
||||
#endif
|
||||
|
||||
/* ************************************************** */
|
||||
/**
|
||||
* @} close group utils
|
||||
**/
|
||||
/* ************************************************** */
|
||||
|
|
@ -1,171 +0,0 @@
|
|||
#include "pfifo.h"
|
||||
#include <dbc.h>
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
|
||||
static void print_pfifo(PriorityFIFO *pfifo);
|
||||
static int empty_pfifo(PriorityFIFO *pfifo);
|
||||
static int full_pfifo(PriorityFIFO *pfifo);
|
||||
|
||||
// TODO: point: initialization changes may be required in this function
|
||||
void init_pfifo(PriorityFIFO *pfifo) {
|
||||
require(pfifo != NULL,
|
||||
"NULL pointer to FIFO"); // a false value indicates a program error
|
||||
|
||||
memset(pfifo->array, 0, sizeof(pfifo->array));
|
||||
pfifo->inp = pfifo->out = pfifo->cnt = 0;
|
||||
pfifo->is_closed = 0;
|
||||
|
||||
pthread_mutex_init(&pfifo->mutex, NULL);
|
||||
pthread_cond_init(&pfifo->not_full, NULL);
|
||||
pthread_cond_init(&pfifo->not_empty, NULL);
|
||||
}
|
||||
|
||||
/* --------------------------------------- */
|
||||
|
||||
// TODO: point: termination changes may be required in this function
|
||||
void term_pfifo(PriorityFIFO *pfifo) {
|
||||
require(pfifo != NULL,
|
||||
"NULL pointer to FIFO"); // a false value indicates a program error
|
||||
require(is_closed_pfifo(pfifo), "FIFO open");
|
||||
|
||||
pthread_mutex_destroy(&pfifo->mutex);
|
||||
pthread_cond_destroy(&pfifo->not_full);
|
||||
pthread_cond_destroy(&pfifo->not_empty);
|
||||
}
|
||||
|
||||
/* --------------------------------------- */
|
||||
|
||||
// TODO: point: synchronization changes may be required in this function
|
||||
void insert_pfifo(PriorityFIFO *pfifo, int id, int priority) {
|
||||
require(pfifo != NULL, "NULL pointer to FIFO");
|
||||
require(id >= 0 && id <= MAX_ID, "invalid id");
|
||||
require(priority > 0 && priority <= MAX_PRIORITY, "invalid priority value");
|
||||
|
||||
// printf("[insert_pfifo] value=%d, priority=%d, pfifo->inp=%d,
|
||||
// pfifo->out=%d\n", id, priority, pfifo->inp, pfifo->out);
|
||||
|
||||
pthread_mutex_lock(&pfifo->mutex);
|
||||
while(!pfifo->is_closed && full_pfifo(pfifo)) {
|
||||
pthread_cond_wait(&pfifo->not_full, &pfifo->mutex);
|
||||
}
|
||||
require(pfifo->is_closed || !full_pfifo(pfifo), "open FIFO is full");
|
||||
|
||||
if (!pfifo->is_closed) {
|
||||
int idx = pfifo->inp;
|
||||
int prev = (idx + FIFO_MAXSIZE - 1) % FIFO_MAXSIZE;
|
||||
while ((idx != pfifo->out) &&
|
||||
(pfifo->array[prev].priority > priority)) {
|
||||
// printf("[insert_pfifo] idx=%d, prev=%d\n", idx, prev);
|
||||
pfifo->array[idx] = pfifo->array[prev];
|
||||
idx = prev;
|
||||
prev = (idx + FIFO_MAXSIZE - 1) % FIFO_MAXSIZE;
|
||||
}
|
||||
// printf("[insert_pfifo] idx=%d, prev=%d\n", idx, prev);
|
||||
pfifo->array[idx].id = id;
|
||||
pfifo->array[idx].priority = priority;
|
||||
pfifo->inp = (pfifo->inp + 1) % FIFO_MAXSIZE;
|
||||
pfifo->cnt++;
|
||||
// printf("[insert_pfifo] pfifo->inp=%d, pfifo->out=%d\n", pfifo->inp,
|
||||
// pfifo->out);
|
||||
}
|
||||
|
||||
pthread_cond_broadcast(&pfifo->not_empty);
|
||||
pthread_mutex_unlock(&pfifo->mutex);
|
||||
}
|
||||
|
||||
/* --------------------------------------- */
|
||||
|
||||
// TODO: point: synchronization changes may be required in this function
|
||||
int retrieve_pfifo(PriorityFIFO *pfifo) {
|
||||
require(pfifo != NULL, "NULL pointer to FIFO");
|
||||
|
||||
pthread_mutex_lock(&pfifo->mutex);
|
||||
while(!pfifo->is_closed && empty_pfifo(pfifo)) {
|
||||
pthread_cond_wait(&pfifo->not_empty, &pfifo->mutex);
|
||||
}
|
||||
require(pfifo->is_closed || !empty_pfifo(pfifo), "FIFO is empty");
|
||||
|
||||
int result = -1;
|
||||
if (!pfifo->is_closed) {
|
||||
check_valid_patient_id(pfifo->array[pfifo->out].id);
|
||||
check_valid_priority(pfifo->array[pfifo->out].priority);
|
||||
|
||||
result = pfifo->array[pfifo->out].id;
|
||||
pfifo->array[pfifo->out].id = INVALID_ID;
|
||||
pfifo->array[pfifo->out].priority = INVALID_PRIORITY;
|
||||
pfifo->out = (pfifo->out + 1) % FIFO_MAXSIZE;
|
||||
pfifo->cnt--;
|
||||
|
||||
// update priority of all remaing elements (increase priority by one)
|
||||
int idx = pfifo->out;
|
||||
for (int i = 1; i <= pfifo->cnt; i++) {
|
||||
if (pfifo->array[idx].priority > 1 &&
|
||||
pfifo->array[idx].priority != INVALID_PRIORITY)
|
||||
pfifo->array[idx].priority--;
|
||||
idx = (idx + 1) % FIFO_MAXSIZE;
|
||||
}
|
||||
}
|
||||
|
||||
ensure((result >= 0 && result <= MAX_ID) || is_closed_pfifo(pfifo), "OPEN FIFO with an invalid id");
|
||||
|
||||
pthread_cond_broadcast(&pfifo->not_full);
|
||||
pthread_mutex_unlock(&pfifo->mutex);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// TODO: point: synchronization changes may be required in this function
|
||||
void close_pfifo(PriorityFIFO *pfifo) {
|
||||
require(pfifo != NULL,
|
||||
"NULL pointer to FIFO"); // a false value indicates a program error
|
||||
require(!is_closed_pfifo(pfifo),
|
||||
"FIFO already closed"); // a false value indicates a program error
|
||||
|
||||
pthread_mutex_lock(&pfifo->mutex);
|
||||
pfifo->is_closed = 1;
|
||||
pthread_cond_broadcast(&pfifo->not_empty);
|
||||
pthread_mutex_unlock(&pfifo->mutex);
|
||||
}
|
||||
|
||||
// TODO: point: synchronization changes may be required in this function
|
||||
int is_closed_pfifo(PriorityFIFO *pfifo) {
|
||||
require(pfifo != NULL,
|
||||
"NULL pointer to FIFO"); // a false value indicates a program error
|
||||
|
||||
return pfifo->is_closed;
|
||||
}
|
||||
|
||||
/* --------------------------------------- */
|
||||
|
||||
static int empty_pfifo(PriorityFIFO *pfifo) {
|
||||
require(pfifo != NULL,
|
||||
"NULL pointer to FIFO"); // a false value indicates a program error
|
||||
|
||||
return pfifo->cnt == 0;
|
||||
}
|
||||
|
||||
/* --------------------------------------- */
|
||||
|
||||
static int full_pfifo(PriorityFIFO *pfifo) {
|
||||
require(pfifo != NULL,
|
||||
"NULL pointer to FIFO"); // a false value indicates a program error
|
||||
|
||||
return pfifo->cnt == FIFO_MAXSIZE;
|
||||
}
|
||||
|
||||
/* --------------------------------------- */
|
||||
|
||||
static void print_pfifo(PriorityFIFO *pfifo) {
|
||||
require(pfifo != NULL,
|
||||
"NULL pointer to FIFO"); // a false value indicates a program error
|
||||
|
||||
int idx = pfifo->out;
|
||||
for (int i = 1; i <= pfifo->cnt; i++) {
|
||||
check_valid_patient_id(pfifo->array[pfifo->out].id);
|
||||
check_valid_priority(pfifo->array[pfifo->out].priority);
|
||||
printf("[%02d] value = %d, priority = %d\n", i, pfifo->array[idx].id,
|
||||
pfifo->array[idx].priority);
|
||||
idx = (idx + 1) % FIFO_MAXSIZE;
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* @brief A priority FIFO (implemented with a circular array),
|
||||
* whose elements are pairs of integers, one being an
|
||||
* non-negative id and the other a positive priority value.
|
||||
*
|
||||
* The following operations are defined:
|
||||
* \li initialization
|
||||
* \li destruction
|
||||
* \li insertion of a value with a given priority
|
||||
* \li retrieval of a value.
|
||||
* \li close
|
||||
* \li check is it is closed
|
||||
**/
|
||||
|
||||
#ifndef PFIFO_H
|
||||
#define PFIFO_H
|
||||
|
||||
#include "settings.h"
|
||||
#include <stdint.h>
|
||||
|
||||
// TODO: point: uncomment the desired implementation
|
||||
#include "thread.h"
|
||||
// #include "process.h"
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
int id; // element ID (works as an index in array all_patients)
|
||||
int priority; // patient priority in FIFO
|
||||
} array[FIFO_MAXSIZE];
|
||||
int inp; ///< point of insertion (queue tail)
|
||||
int out; ///< point of retrieval (queue head)
|
||||
int cnt; ///< number of items stored
|
||||
int is_closed; ///< true when closed
|
||||
// TODO: point: if necessary, add synchronization declarations here
|
||||
pthread_mutex_t mutex;
|
||||
pthread_cond_t not_full;
|
||||
pthread_cond_t not_empty;
|
||||
} PriorityFIFO;
|
||||
|
||||
void init_pfifo(PriorityFIFO *pfifo);
|
||||
void term_pfifo(PriorityFIFO *pfifo);
|
||||
void insert_pfifo(PriorityFIFO *pfifo, int id, int priority);
|
||||
int retrieve_pfifo(PriorityFIFO *pfifo);
|
||||
void close_pfifo(PriorityFIFO *pfifo);
|
||||
int is_closed_pfifo(PriorityFIFO *pfifo);
|
||||
|
||||
#endif
|
|
@ -1,96 +0,0 @@
|
|||
/**
|
||||
* @brief Simulation parameter values.
|
||||
*/
|
||||
|
||||
#ifndef SETTINGS_H
|
||||
#define SETTINGS_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/**
|
||||
* \brief maximum patient name length
|
||||
*/
|
||||
#define MAX_NAME 31
|
||||
|
||||
/**
|
||||
* \brief maximum number of patients
|
||||
*/
|
||||
#define MAX_PATIENTS 100
|
||||
|
||||
/**
|
||||
* \brief maximum number of nurses
|
||||
*/
|
||||
#define MAX_NURSES 20
|
||||
|
||||
/**
|
||||
* \brief maximum number of doctors
|
||||
*/
|
||||
#define MAX_DOCTORS 20
|
||||
|
||||
/**
|
||||
* \brief maximum time (in microseconds) in random waits
|
||||
*/
|
||||
#define MAX_WAIT 100000
|
||||
|
||||
/**
|
||||
* \brief initial priority value for Manchester system colors
|
||||
*/
|
||||
#define RED 1
|
||||
#define ORANGE 2
|
||||
#define YELLOW 4
|
||||
#define GREEN 8
|
||||
#define BLUE 16
|
||||
|
||||
/**
|
||||
* \brief maximum elements in FIFO
|
||||
*/
|
||||
#define FIFO_MAXSIZE 5
|
||||
|
||||
/**
|
||||
* \brief maximum value accepted for an id
|
||||
*/
|
||||
#define MAX_ID (MAX_PATIENTS-1)
|
||||
|
||||
/**
|
||||
* \brief invalid id number
|
||||
*/
|
||||
#define INVALID_ID 99999999
|
||||
|
||||
/**
|
||||
* \brief maximum value accepted for a priority
|
||||
*/
|
||||
#define MAX_PRIORITY BLUE
|
||||
|
||||
/**
|
||||
* \brief invalid priority number
|
||||
*/
|
||||
#define INVALID_PRIORITY 55555555
|
||||
|
||||
/**
|
||||
* \brief patient id verification test
|
||||
*/
|
||||
#define check_valid_patient_id(id) do { if(id < 0 || id > MAX_ID) { printf("\e[31;01m[%s, line %d, function %s] ERROR: invalid patient ID %d!\e[0m\n", __FILE__, __LINE__, __FUNCTION__, id); exit(EXIT_FAILURE); } } while(0)
|
||||
|
||||
/**
|
||||
* \brief nurse id verification test
|
||||
*/
|
||||
#define check_valid_nurse_id(id) do { if(id < 0 || id >= MAX_NURSES) { printf("\e[31;01m[%s, line %d, function %s] ERROR: invalid nurse ID %d!\e[0m\n", __FILE__, __LINE__, __FUNCTION__, id); exit(EXIT_FAILURE); } } while(0)
|
||||
|
||||
/**
|
||||
* \brief doctor id verification test
|
||||
*/
|
||||
#define check_valid_doctor_id(id) do { if(id < 0 || id >= MAX_DOCTORS) { printf("\e[31;01m[%s, line %d, function %s] ERROR: invalid doctor ID %d!\e[0m\n", __FILE__, __LINE__, __FUNCTION__, id); exit(EXIT_FAILURE); } } while(0)
|
||||
|
||||
/**
|
||||
* \brief priority verification test
|
||||
*/
|
||||
#define check_valid_priority(priority) do { if(priority < 1 || priority > MAX_PRIORITY) { printf("\e[31;01m[%s, line %d, function %s] ERROR: invalid priority %d!\e[0m\n", __FILE__, __LINE__, __FUNCTION__, priority); exit(EXIT_FAILURE); } } while(0)
|
||||
|
||||
/**
|
||||
* \brief patient name verification test
|
||||
*/
|
||||
#define check_valid_name(name) do { if(name[0] == '\0') { printf("\e[31;01m[%s, line %d, function %s] ERROR: invalid patient with name \"%s\"!\e[0m\n", __FILE__, __LINE__, __FUNCTION__, name); exit(EXIT_FAILURE); } } while(0)
|
||||
|
||||
#endif
|
||||
|
|
@ -1,374 +0,0 @@
|
|||
/**
|
||||
* @file
|
||||
*
|
||||
* \brief A hospital pediatric urgency with a Manchester triage system.
|
||||
*/
|
||||
|
||||
#include "pfifo.h"
|
||||
#include "settings.h"
|
||||
#include <iostream>
|
||||
#include <libgen.h>
|
||||
#include <math.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <thread.h>
|
||||
#include <unistd.h>
|
||||
#include <utils.h>
|
||||
|
||||
/* DO NOT CHANGE THE FOLLOWING VALUES, run program with option -h to set a
|
||||
* different values */
|
||||
|
||||
static int npatients = 4; ///< number of patients
|
||||
static int nnurses = 1; ///< number of triage nurses
|
||||
static int ndoctors = 1; ///< number of doctors
|
||||
|
||||
#define USAGE \
|
||||
"Synopsis: %s [options]\n" \
|
||||
"\t----------+-----------------------------------------------------------" \
|
||||
"--\n" \
|
||||
"\t Option | Description " \
|
||||
" \n" \
|
||||
"\t----------+-----------------------------------------------------------" \
|
||||
"--\n" \
|
||||
"\t -p num | number of patients (dfl: %d, min: %d, max: %d) " \
|
||||
" \n" \
|
||||
"\t -n num | number of nurses (dfl: %d, min: %d, max: %d) " \
|
||||
" \n" \
|
||||
"\t -d num | number of doctors (dfl: %d, min: %d, max: %d) " \
|
||||
" \n" \
|
||||
"\t -h | this help " \
|
||||
" \n" \
|
||||
"\t----------+-----------------------------------------------------------" \
|
||||
"--\n", \
|
||||
basename(argv[0]), npatients, 1, MAX_PATIENTS, nnurses, 1, MAX_NURSES, \
|
||||
ndoctors, 1, MAX_DOCTORS
|
||||
|
||||
// TODO: point: changes may be required in these date structures
|
||||
|
||||
/**
|
||||
* \brief Patient data structure
|
||||
*/
|
||||
typedef struct {
|
||||
char name[MAX_NAME + 1];
|
||||
int done; // 0: waiting for consultation; 1: consultation finished
|
||||
// TODO: point: if necessary, add new fields here
|
||||
pthread_mutex_t mutex;
|
||||
pthread_cond_t cond;
|
||||
} Patient;
|
||||
|
||||
typedef struct {
|
||||
int num_patients;
|
||||
Patient all_patients[MAX_PATIENTS];
|
||||
PriorityFIFO triage_queue;
|
||||
PriorityFIFO doctor_queue;
|
||||
// TODO: point: if necessary, add new fields here
|
||||
} HospitalData;
|
||||
|
||||
HospitalData *hd = NULL;
|
||||
|
||||
// TODO: point: if necessary, add module variables here
|
||||
|
||||
/**
|
||||
* \brief verification tests:
|
||||
*/
|
||||
#define check_valid_patient(id) \
|
||||
do { \
|
||||
check_valid_patient_id(id); \
|
||||
check_valid_name(hd->all_patients[id].name); \
|
||||
} while (0)
|
||||
#define check_valid_nurse(id) \
|
||||
do { \
|
||||
check_valid_nurse_id(id); \
|
||||
} while (0)
|
||||
#define check_valid_doctor(id) \
|
||||
do { \
|
||||
check_valid_doctor_id(id); \
|
||||
} while (0)
|
||||
|
||||
int random_manchester_triage_priority();
|
||||
void new_patient(Patient *patient); // initializes a new patient
|
||||
void random_wait();
|
||||
|
||||
/* ************************************************* */
|
||||
|
||||
// TODO: point: changes may be required to this function
|
||||
void init_simulation(int np) {
|
||||
printf("Initializing simulation\n");
|
||||
hd = (HospitalData *)mem_alloc(sizeof(
|
||||
HospitalData)); // mem_alloc is a malloc with NULL pointer verification
|
||||
memset(hd, 0, sizeof(HospitalData));
|
||||
hd->num_patients = np;
|
||||
init_pfifo(&hd->triage_queue);
|
||||
init_pfifo(&hd->doctor_queue);
|
||||
}
|
||||
|
||||
/* ************************************************* */
|
||||
|
||||
// TODO: point: changes may be required to this function
|
||||
void term_simulation(int np) {
|
||||
// DO NOT WAIT THE TERMINATION OF ACTIVE ENTITIES IN THIS FUNCTION!
|
||||
// This function is just to release the allocated resources
|
||||
|
||||
printf("Releasing resources\n");
|
||||
term_pfifo(&hd->doctor_queue);
|
||||
term_pfifo(&hd->triage_queue);
|
||||
free(hd);
|
||||
hd = NULL;
|
||||
}
|
||||
|
||||
/* ************************************************* */
|
||||
|
||||
// TODO: point: changes may be required to this function
|
||||
int nurse_iteration(int id) // return value can be used to request termination
|
||||
{
|
||||
check_valid_nurse(id);
|
||||
printf("\e[34;01mNurse %d: get next patient\e[0m\n", id);
|
||||
int patient = retrieve_pfifo(&hd->triage_queue);
|
||||
// TODO: point: PUT YOUR NURSE TERMINATION CODE HERE:
|
||||
if (patient == -1) return -1;
|
||||
check_valid_patient(patient);
|
||||
printf("\e[34;01mNurse %d: evaluate patient %d priority\e[0m\n", id,
|
||||
patient);
|
||||
int priority = random_manchester_triage_priority();
|
||||
printf("\e[34;01mNurse %d: add patient %d with priority %d to doctor "
|
||||
"queue\e[0m\n",
|
||||
id, patient, priority);
|
||||
insert_pfifo(&hd->doctor_queue, patient, priority);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ************************************************* */
|
||||
|
||||
// TODO: point: changes may be required to this function
|
||||
int doctor_iteration(int id) // return value can be used to request termination
|
||||
{
|
||||
check_valid_doctor(id);
|
||||
printf("\e[32;01mDoctor %d: get next patient\e[0m\n", id);
|
||||
int patient = retrieve_pfifo(&hd->doctor_queue);
|
||||
// TODO: point: PUT YOUR DOCTOR TERMINATION CODE HERE:
|
||||
if (patient == -1) return -1;
|
||||
check_valid_patient(patient);
|
||||
printf("\e[32;01mDoctor %d: treat patient %d\e[0m\n", id, patient);
|
||||
random_wait();
|
||||
printf("\e[32;01mDoctor %d: patient %d treated\e[0m\n", id, patient);
|
||||
// TODO: point: PUT YOUR PATIENT CONSULTATION FINISHED NOTIFICATION CODE
|
||||
// HERE:
|
||||
pthread_mutex_lock(&hd->all_patients[patient].mutex);
|
||||
hd->all_patients[patient].done = 1;
|
||||
pthread_cond_broadcast(&hd->all_patients[patient].cond);
|
||||
pthread_mutex_unlock(&hd->all_patients[patient].mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ************************************************* */
|
||||
|
||||
void patient_goto_urgency(int id) {
|
||||
new_patient(&hd->all_patients[id]);
|
||||
check_valid_name(hd->all_patients[id].name);
|
||||
printf("\e[30;01mPatient %s (number %d): get to hospital\e[0m\n",
|
||||
hd->all_patients[id].name, id);
|
||||
insert_pfifo(&hd->triage_queue, id,
|
||||
1); // all elements in triage queue with the same priority!
|
||||
}
|
||||
|
||||
// TODO: point: changes may be required to this function
|
||||
void patient_wait_end_of_consultation(int id) {
|
||||
check_valid_name(hd->all_patients[id].name);
|
||||
// TODO: point: PUT YOUR WAIT CODE FOR FINISHED CONSULTATION HERE:
|
||||
|
||||
pthread_mutex_lock(&hd->all_patients[id].mutex);
|
||||
while (!hd->all_patients[id].done)
|
||||
pthread_cond_wait(&hd->all_patients[id].cond, &hd->all_patients[id].mutex);
|
||||
pthread_mutex_unlock(&hd->all_patients[id].mutex);
|
||||
|
||||
printf("\e[30;01mPatient %s (number %d): health problems treated\e[0m\n",
|
||||
hd->all_patients[id].name, id);
|
||||
}
|
||||
|
||||
// TODO: point: changes are required to this function
|
||||
void patient_life(int id) {
|
||||
patient_goto_urgency(id);
|
||||
// nurse_iteration(
|
||||
// 0); // TODO: point: to be commented/deleted in concurrent version
|
||||
// doctor_iteration(
|
||||
// 0); // TODO: point: to be commented/deleted in concurrent version
|
||||
patient_wait_end_of_consultation(id);
|
||||
|
||||
pthread_mutex_destroy(&hd->all_patients[id].mutex);
|
||||
pthread_cond_destroy(&hd->all_patients[id].cond);
|
||||
|
||||
memset(&(hd->all_patients[id]), 0, sizeof(Patient)); // patient finished
|
||||
}
|
||||
|
||||
/* ************************************************* */
|
||||
|
||||
// TODO: point: if necessary, add extra functions here:
|
||||
|
||||
void *pthread_fn_patient(void *arg) {
|
||||
int id = *(int *)arg;
|
||||
patient_life(id);
|
||||
|
||||
int status = EXIT_SUCCESS;
|
||||
pthread_exit(&status);
|
||||
}
|
||||
|
||||
void *pthread_fn_nurse(void *arg) {
|
||||
int id = *(int *)arg;
|
||||
|
||||
while (nurse_iteration(id) != -1);
|
||||
|
||||
int status = EXIT_SUCCESS;
|
||||
pthread_exit(&status);
|
||||
}
|
||||
|
||||
void *pthread_fn_doctor(void *arg) {
|
||||
int id = *(int *)arg;
|
||||
|
||||
while (doctor_iteration(id) != -1);
|
||||
|
||||
int status = EXIT_SUCCESS;
|
||||
pthread_exit(&status);
|
||||
}
|
||||
|
||||
/* ************************************************* */
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
/* command line processing */
|
||||
int option;
|
||||
while ((option = getopt(argc, argv, "p:n:d:h")) != -1) {
|
||||
switch (option) {
|
||||
case 'p':
|
||||
npatients = atoi(optarg);
|
||||
if (npatients < 1 || npatients > MAX_PATIENTS) {
|
||||
fprintf(stderr, "Invalid number of patients!\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
break;
|
||||
case 'n':
|
||||
nnurses = atoi(optarg);
|
||||
if (nnurses < 1 || nnurses > MAX_NURSES) {
|
||||
fprintf(stderr, "Invalid number of nurses!\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
ndoctors = atoi(optarg);
|
||||
if (ndoctors < 1 || nnurses > MAX_DOCTORS) {
|
||||
fprintf(stderr, "Invalid number of doctors!\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
break;
|
||||
case 'h':
|
||||
printf(USAGE);
|
||||
return EXIT_SUCCESS;
|
||||
default:
|
||||
fprintf(stderr, "Non valid option!\n");
|
||||
fprintf(stderr, USAGE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
/* start random generator */
|
||||
srand(getpid());
|
||||
|
||||
/* init simulation */
|
||||
init_simulation(npatients);
|
||||
|
||||
// TODO: point: REPLACE THE FOLLOWING DUMMY CODE WITH code to launch
|
||||
// active entities and code to properly terminate the simulation.
|
||||
/* dummy code to show a very simple sequential behavior */
|
||||
// for(int i = 0; i < npatients; i++)
|
||||
// {
|
||||
// printf("\n");
|
||||
// random_wait(); // random wait for patience creation
|
||||
// patient_life(i);
|
||||
// }
|
||||
/* end of dummy code */
|
||||
|
||||
// ######################################
|
||||
// CREATE
|
||||
|
||||
pthread_t patients[npatients];
|
||||
pthread_t nurses[nnurses];
|
||||
pthread_t doctors[ndoctors];
|
||||
|
||||
int patients_ids[npatients];
|
||||
int nurses_ids[nnurses];
|
||||
int doctors_ids[ndoctors];
|
||||
|
||||
for (int i = 0; i < npatients; i++) {
|
||||
patients_ids[i] = i;
|
||||
pthread_create(&patients[i], NULL, pthread_fn_patient, (void *)&patients_ids[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < nnurses; i++) {
|
||||
nurses_ids[i] = i;
|
||||
pthread_create(&nurses[i], NULL, pthread_fn_nurse, (void *)&nurses_ids[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < ndoctors; i++) {
|
||||
doctors_ids[i] = i;
|
||||
pthread_create(&doctors[i], NULL, pthread_fn_doctor, (void *)&doctors_ids[i]);
|
||||
}
|
||||
|
||||
// ######################################
|
||||
// JOIN
|
||||
|
||||
for (int i = 0; i < npatients; i++)
|
||||
pthread_join(patients[i], NULL);
|
||||
|
||||
close_pfifo(&hd->triage_queue);
|
||||
close_pfifo(&hd->doctor_queue);
|
||||
|
||||
for (int i = 0; i < nnurses; i++)
|
||||
pthread_join(nurses[i], NULL);
|
||||
|
||||
for (int i = 0; i < ndoctors; i++)
|
||||
pthread_join(doctors[i], NULL);
|
||||
|
||||
/* terminate simulation */
|
||||
term_simulation(npatients);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* IGNORE THE FOLLOWING CODE */
|
||||
|
||||
int random_manchester_triage_priority() {
|
||||
int result;
|
||||
int perc = random_int(0, 100);
|
||||
if (perc < 10)
|
||||
result = RED;
|
||||
else if (perc < 30)
|
||||
result = ORANGE;
|
||||
else if (perc < 50)
|
||||
result = YELLOW;
|
||||
else if (perc < 75)
|
||||
result = GREEN;
|
||||
else
|
||||
result = BLUE;
|
||||
return result;
|
||||
}
|
||||
|
||||
static char **names =
|
||||
(char *[]){"Ana", "Miguel", "Luis", "Joao", "Artur", "Maria",
|
||||
"Luisa", "Mario", "Augusto", "Antonio", "Jose", "Alice",
|
||||
"Almerindo", "Gustavo", "Paulo", "Paula", NULL};
|
||||
static int names_len = 16;
|
||||
|
||||
char *random_name() { return names[random_int(0, names_len - 1)]; }
|
||||
|
||||
void new_patient(Patient *patient) {
|
||||
strcpy(patient->name, random_name());
|
||||
patient->done = 0;
|
||||
}
|
||||
|
||||
void random_wait() { usleep((useconds_t)random_int(0, MAX_WAIT)); }
|