BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf64-x86-64\""
endif
+ifeq ($(OBJDIR), armv8l)
+BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B arm -I binary -O elf32-littlearm\""
+endif
+
+ifeq ($(OBJDIR), aarch64)
+BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B arm -I binary -O elf64-littlearm\""
+endif
+
$(shell mkdir -p $(OBJDIR) )
OBJS = \
--- /dev/null
+/* BThread main header
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+# define PTHREAD_CANCEL_ENABLE 0x00000010
+# define PTHREAD_CANCEL_DISABLE 0x00000000
+
+# define PTHREAD_CANCEL_ASYNCHRONOUS 0x00000020
+# define PTHREAD_CANCEL_DEFERRED 0x00000000
+
+#define PTHREAD_CANCELED ((void *) -1)
+
+int pthread_setcancelstate (int , int *);
+int pthread_setcanceltype (int , int *);
+void pthread_testcancel (void);
+int pthread_cancel (pthread_t t);
new_user[j] = new_dir[i];
}
new_user[j] = 0;
-
+#if !defined(__TERMUX__)
setpwent();
while( (pw = getpwent()) != 0 )
{
}
}
endpwent();
+#endif
return 0;
}
}
#include <string.h>
#include <typeinfo>
#include "thread.h"
+#if defined(__TERMUX__)
+#include "bthread.h"
+#endif
Thread::Thread(int synchronous, int realtime, int autodelete)
perror("Thread::start pthread_attr_setschedparam");
}
else {
+#if !defined(__TERMUX__)
if(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED) < 0)
perror("Thread::start pthread_attr_setinheritsched");
+#endif
}
// autodelete may delete this immediately after create
#include <pthread.h>
#include <unistd.h>
+#if !defined(__TERMUX__)
+
#ifndef NO_TID
#include <sys/syscall.h>
static inline long gettid() { return (long)pthread_self(); }
#endif
+#endif
+
// The thread does not autodelete by default.
// If autodelete is 1 the thread autodeletes.
// If it's synchronous the deletion occurs in join().
shmid = -1;
break;
- case VFrame::SHMGET:
+ case VFrame::SHM_GET:
if(data)
shmdt(data);
data = 0;
this->v_offset = v_offset;
}
else if( shmid >= 0 ) {
- memory_type = VFrame::SHMGET;
+ memory_type = VFrame::SHM_GET;
this->data = (unsigned char*)shmat(shmid, NULL, 0);
if( this->data == (unsigned char*)-1 ) {
printf("VFrame::allocate_data %d could not attach"
else
if(shmid >= 0)
{
- memory_type = VFrame::SHMGET;
+ memory_type = VFrame::SHM_GET;
this->data = (unsigned char*)shmat(shmid, NULL, 0);
this->shmid = shmid;
}
else
if(shmid >= 0)
{
- memory_type = VFrame::SHMGET;
+ memory_type = VFrame::SHM_GET;
this->data = (unsigned char*)shmat(shmid, NULL, 0);
this->shmid = shmid;
}
else
free(data);
}
- else if( memory_type == VFrame::SHMGET ) {
+ else if( memory_type == VFrame::SHM_GET ) {
if( data ) shmdt(data);
}
{
PRIVATE,
SHARED,
- SHMGET
+ SHM_GET
};
// Data pointer is pointing to someone else's buffer.