fix small EClipse complaints

This commit is contained in:
Vítor Santos Costa 2014-05-25 20:50:07 +01:00
parent 99ab3fb748
commit dee3774bbc
15 changed files with 65 additions and 73 deletions

View File

@ -509,9 +509,9 @@ Yap_thread_self(void)
}
CELL
Yap_thread_create_engine(thread_attr *ops)
Yap_thread_create_engine(YAP_thread_attr *ops)
{
thread_attr opsv;
YAP_thread_attr opsv;
int new_id = allocate_new_tid();
Term t = TermNil;

View File

@ -18,12 +18,13 @@
#ifndef ATOMS_H
#define ATOMS_H 1
#undef EXTERN
#ifndef EXTERN
#ifndef ADTDEFS_C
#define EXTERN static
#else
#define EXTERN
#endif
#endif
#include <wchar.h>

View File

@ -66,9 +66,10 @@
#define YAP_PROTECTED_MASK 0x00000000L
#include "inline-only.h"
INLINE_ONLY inline EXTERN int IsVarTerm (Term);
INLINE_ONLY inline EXTERN int
INLINE_ONLY int IsVarTerm (Term);
INLINE_ONLY int
IsVarTerm (Term t)
{
return (int) (Signed (t) >= 0);
@ -76,9 +77,9 @@ IsVarTerm (Term t)
INLINE_ONLY inline EXTERN int IsNonVarTerm (Term);
INLINE_ONLY int IsNonVarTerm (Term);
INLINE_ONLY inline EXTERN int
INLINE_ONLY int
IsNonVarTerm (Term t)
{
return (int) (Signed (t) < 0);
@ -86,9 +87,9 @@ IsNonVarTerm (Term t)
INLINE_ONLY inline EXTERN Term *RepPair (Term);
INLINE_ONLY Term *RepPair (Term);
INLINE_ONLY inline EXTERN Term *
INLINE_ONLY Term *
RepPair (Term t)
{
return (Term *) (NonTagPart (t));
@ -96,9 +97,9 @@ RepPair (Term t)
INLINE_ONLY inline EXTERN Term AbsPair (Term *);
INLINE_ONLY Term AbsPair (Term *);
INLINE_ONLY inline EXTERN Term
INLINE_ONLY Term
AbsPair (Term * p)
{
return (Term) (TAGGEDA (PairTag, (p)));
@ -106,9 +107,9 @@ AbsPair (Term * p)
INLINE_ONLY inline EXTERN Int IsPairTerm (Term);
INLINE_ONLY Int IsPairTerm (Term);
INLINE_ONLY inline EXTERN Int
INLINE_ONLY Int
IsPairTerm (Term t)
{
return (Int) (BitOn (PairBit, (t)));
@ -116,9 +117,9 @@ IsPairTerm (Term t)
INLINE_ONLY inline EXTERN Term *RepAppl (Term);
INLINE_ONLY Term *RepAppl (Term);
INLINE_ONLY inline EXTERN Term *
INLINE_ONLY Term *
RepAppl (Term t)
{
return (Term *) (NonTagPart (t));
@ -126,9 +127,9 @@ RepAppl (Term t)
INLINE_ONLY inline EXTERN Term AbsAppl (Term *);
INLINE_ONLY Term AbsAppl (Term *);
INLINE_ONLY inline EXTERN Term
INLINE_ONLY Term
AbsAppl (Term * p)
{
return (Term) (TAGGEDA (ApplTag, (p)));
@ -136,9 +137,9 @@ AbsAppl (Term * p)
INLINE_ONLY inline EXTERN Int IsApplTerm (Term);
INLINE_ONLY Int IsApplTerm (Term);
INLINE_ONLY inline EXTERN Int
INLINE_ONLY Int
IsApplTerm (Term t)
{
return (Int) (BitOn (ApplBit, (t)));
@ -146,9 +147,9 @@ IsApplTerm (Term t)
INLINE_ONLY inline EXTERN Int IsAtomOrIntTerm (Term);
INLINE_ONLY Int IsAtomOrIntTerm (Term);
INLINE_ONLY inline EXTERN Int
INLINE_ONLY Int
IsAtomOrIntTerm (Term t)
{
return (Int) (!(Unsigned (t) & CompBits));
@ -157,9 +158,9 @@ IsAtomOrIntTerm (Term t)
INLINE_ONLY inline EXTERN Term AdjustPtr (Term t, Term off);
INLINE_ONLY Term AdjustPtr (Term t, Term off);
INLINE_ONLY inline EXTERN Term
INLINE_ONLY Term
AdjustPtr (Term t, Term off)
{
return (Term) ((t) + off);
@ -167,9 +168,9 @@ AdjustPtr (Term t, Term off)
INLINE_ONLY inline EXTERN Term AdjustIDBPtr (Term t, Term off);
INLINE_ONLY Term AdjustIDBPtr (Term t, Term off);
INLINE_ONLY inline EXTERN Term
INLINE_ONLY Term
AdjustIDBPtr (Term t, Term off)
{
return (Term) ((t) + off);

View File

@ -14,6 +14,8 @@
* version: $Id: Tags_32LowTag.h,v 1.4 2008-01-30 10:35:43 vsc Exp $ *
*************************************************************************/
#if FALSE /* not in use */
#define TAG_LOW_BITS_32 1
/* Version for 32 bit addresses machines,
@ -196,3 +198,7 @@ IntOfTerm (Term t)
{
return (Int) (((Int) (t << 1)) >> (SHIFT_LOW_TAG + SHIFT_HIGH_TAG + 1));
}
#endif /* currently not in use */

View File

@ -49,6 +49,8 @@ are now 1 in compound terms and structures.
*/
#if SIZEOF_INT_P==4
#define TAGS_FAST_OPS 1
#define SHIFT_HIGH_TAG 29
@ -320,3 +322,8 @@ AdjustIDBPtr (Term t, Term off)
#endif
#endif /* SIZEOF_INT_P==4 */

View File

@ -37,6 +37,8 @@ property list
*/
#if FALSE
#define SHIFT_HIGH_TAG 29
#define MKTAG(HI,LO) ((((UInt) (HI))<<SHIFT_HIGH_TAG)|(LO))
@ -188,3 +190,5 @@ IntOfTerm (Term t)
{
return (Int) (((Int) (t << 3)) >> (3 + 2));
}
#endif /* NOT IN USE */

View File

@ -21,6 +21,8 @@
* version: $Id: Tags_64bits.h,v 1.3 2008-05-15 13:41:46 vsc Exp $ *
*************************************************************************/
#if SIZEOF_INT_P==8
#define TAG_64BITS 1
/* Version for 64 bit addresses machines,
@ -192,3 +194,7 @@ IntOfTerm (Term t)
{
return (Int) ((Int) (Unsigned (t) << 3) >> 6);
}
#endif /* 64 Bits */

View File

@ -296,6 +296,14 @@ typedef pthread_rwlock_t rwlock_t;
#define OUTSIDE(MIN,X,MAX) ((void *)(X) < (void *)(MIN) || (void *)(X) > (void *)(MAX))
#endif
/*************************************************************************************************
main exports in YapInterface.h
*************************************************************************************************/
/* Basic exports */
#include "YapDefs.h"
/*************************************************************************************************
Atoms
*************************************************************************************************/

View File

@ -21,7 +21,7 @@
/* consulting files */
typedef union CONSULT_OBJ {
char *filename;
const char *filename;
int mode;
Prop p;
UInt c;

View File

@ -5,7 +5,7 @@
#define INLINE_ONLY __attribute__((gnu_inline,always_inline))
//#define INLINE_ONLY
#else
#define INLINE_ONLY
#define INLINE_ONLY inline EXTERN
#endif
#endif

View File

@ -1,33 +0,0 @@
#define SHORT_ADDRESSES 0
#undef SHORT_INTS
#undef SHORT_SPACE
#define FUNCTION_ADRESSES 0
#define ALIGN_LONGS 1
#undef LOW_ABSMI
#define MSHIFTOFFS 1
#define HAVE_SIGNAL 1
#define UInt unsigned int
#define UShort unsigned short
#define Int int
#define FFIEEE 1
#define Float float
#define FAFloat double
#define FunAdr(X) X
#define MIPSEL
#define HAVE_PROTO 1

View File

@ -3,20 +3,12 @@
#define THREADS_H 1
typedef struct thread_attr_struct {
UInt ssize;
UInt tsize;
UInt sysize;
int (*cancel)(int thread);
Term egoal;
} thread_attr;
#ifdef THREADS
Int Yap_thread_self(void);
int Yap_get_thread_ref_count(int);
void Yap_set_thread_ref_count(int,int);
CELL Yap_thread_create_engine(thread_attr *);
CELL Yap_thread_create_engine(YAP_thread_attr *);
Int Yap_thread_attach_engine(int);
Int Yap_thread_detach_engine(int);
Int Yap_thread_destroy_engine(int);

View File

@ -30,7 +30,7 @@ typedef struct udi_info *UdiInfo;
/* to ease code for a UdiInfo hash table*/
#define HASH_FIND_UdiInfo(head,find,out) \
HASH_FIND(hh,head,find,sizeof(PredEntry *),out)
HASH_FIND(hh,head,find,sizeof(PredEntry),out)
#define HASH_ADD_UdiInfo(head,p,add) \
HASH_ADD_KEYPTR(hh,head,p,sizeof(PredEntry *),add)

View File

@ -273,7 +273,7 @@ int Yap_GetFreeStreamDForReading(void);
Term Yap_WStringToList(wchar_t *);
Term Yap_WStringToListOfAtoms(wchar_t *);
Atom Yap_LookupWideAtom( wchar_t * );
Atom Yap_LookupWideAtom( const wchar_t * );
#define YAP_INPUT_STREAM 0x01
#define YAP_OUTPUT_STREAM 0x02

View File

@ -2655,7 +2655,7 @@ X_API int PL_thread_attach_engine(const PL_thread_attr_t *attr)
yapt.ssize = attr->local_size;
yapt.tsize = attr->global_size;
yapt.alias = (YAP_Term)attr->alias;
yapt.alias = MkAtomTerm(Yap_LookupAtom(attr->alias));
yapt.cancel = attr->cancel;
wid = YAP_ThreadCreateEngine(&yapt);
} else {
@ -2704,7 +2704,7 @@ PL_create_engine(const PL_thread_attr_t *attr)
yapt.ssize = attr->local_size;
yapt.tsize = attr->global_size;
yapt.alias = (YAP_Term)attr->alias;
yapt.alias = MkAtomTerm(Yap_LookupAtom(attr->alias));
yapt.cancel = attr->cancel;
eng = YAP_ThreadCreateEngine(&yapt);