Skip to content

Commit 95b8d57

Browse files
committed
Updating declarations.
1 parent 997619d commit 95b8d57

File tree

3 files changed

+22
-34
lines changed

3 files changed

+22
-34
lines changed

src/opt/ufar/UfarPth.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
#include "opt/untk/NtkNtk.h"
1212
#include "UfarPth.h"
1313

14-
ABC_NAMESPACE_IMPL_START
15-
16-
extern "C" {
14+
ABC_NAMESPACE_HEADER_START
1715
Abc_Ntk_t * Abc_NtkFromAigPhase( Aig_Man_t * pAig );
1816
int Abc_NtkDarBmc3( Abc_Ntk_t * pAbcNtk, Saig_ParBmc_t * pBmcPars, int fOrDecomp );
1917
Wla_Man_t * Wla_ManStart( Wlc_Ntk_t * pNtk, Wlc_Par_t * pPars );
2018
void Wla_ManStop( Wla_Man_t * pWla );
2119
int Wla_ManSolve( Wla_Man_t * pWla, Wlc_Par_t * pPars );
22-
}
20+
ABC_NAMESPACE_HEADER_END
21+
22+
ABC_NAMESPACE_IMPL_START
2323

2424
static volatile int g_nRunIds = 0; // the number of the last prover instance
2525
int Ufar_CallBackToStop( int RunId ) { assert( RunId <= g_nRunIds ); return RunId < g_nRunIds; }

src/opt/untk/NtkNtk.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
#include "NtkNtk.h"
2121
#include "Netlist.h"
2222

23-
ABC_NAMESPACE_IMPL_START
24-
25-
extern "C" {
23+
ABC_NAMESPACE_HEADER_START
2624
Abc_Ntk_t * Abc_NtkFromAigPhase( Aig_Man_t * pMan );
2725
int Abc_NtkDarPdr( Abc_Ntk_t * pNtk, Pdr_Par_t * pPars );
2826
int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp );
@@ -36,7 +34,9 @@ extern "C" {
3634
int Wla_ManSolve( Wla_Man_t * pWla, Wlc_Par_t * pPars );
3735
Gia_Man_t * Wlc_NtkBitBlast2( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds );
3836
//void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars );
39-
}
37+
ABC_NAMESPACE_HEADER_END
38+
39+
ABC_NAMESPACE_IMPL_START
4040

4141
using namespace std;
4242

src/opt/util/util.cpp

100755100644
Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
#include "misc/util/abc_namespaces.h"
1313
#include "util.h"
1414

15+
#ifdef __linux__
16+
#include <sys/prctl.h>
17+
#elif defined(__APPLE__)
18+
#include <thread>
19+
#include <cassert>
20+
#include <cerrno>
21+
#include <sys/types.h>
22+
#include <sys/event.h>
23+
#include <sys/time.h>
24+
#endif
25+
1526
ABC_NAMESPACE_IMPL_START
1627

1728
using namespace std;
@@ -50,14 +61,8 @@ void OptMgr::PrintUsage() {
5061
}
5162
}
5263

53-
ABC_NAMESPACE_IMPL_END
54-
5564
#ifdef __linux__
5665

57-
#include <sys/prctl.h>
58-
59-
ABC_NAMESPACE_IMPL_START
60-
6166
void kill_on_parent_death(int sig)
6267
{
6368
// kill process if parent dies
@@ -71,21 +76,8 @@ void kill_on_parent_death(int sig)
7176
}
7277
}
7378

74-
ABC_NAMESPACE_IMPL_END
75-
7679
#elif defined(__APPLE__)
7780

78-
#include <thread>
79-
80-
#include <cassert>
81-
#include <cerrno>
82-
83-
#include <sys/types.h>
84-
#include <sys/event.h>
85-
#include <sys/time.h>
86-
87-
ABC_NAMESPACE_IMPL_START
88-
8981
template <typename Func>
9082
static auto retry_eintr(Func &&fn) -> decltype(fn())
9183
{
@@ -115,7 +107,7 @@ void kill_on_parent_death(int sig)
115107
kevent(kq, &change, 1, &event, 1, &ts);
116108

117109
// however, if ppid died before the call to kevent, ppid might not be the pid of the parent
118-
// in that case, the process it would be adopted by init, whose pid is 1
110+
// in that case, it would be adopted by init, whose pid is 1
119111
if( getppid() == 1 )
120112
{
121113
raise(sig);
@@ -132,16 +124,12 @@ void kill_on_parent_death(int sig)
132124
monitor_thread.detach();
133125
}
134126

135-
ABC_NAMESPACE_IMPL_END
136-
137127
#else // neither linux or OS X
138128

139-
ABC_NAMESPACE_IMPL_START
140-
141129
void kill_on_parent_death(int sig)
142130
{
143131
}
144132

145-
ABC_NAMESPACE_IMPL_END
146-
147133
#endif
134+
135+
ABC_NAMESPACE_IMPL_END

0 commit comments

Comments
 (0)