Merge branch 'master' into dev/netservices

Change-Id: Ic4c065b9a76fcabd6450dd1ab5882510f922a128
This commit is contained in:
Niels Sascha Reedijk
2022-09-18 16:16:37 +01:00
156 changed files with 4180 additions and 4570 deletions
+2 -2
View File
@@ -169,8 +169,8 @@ namespace agg
private:
AGG_INLINE const int8u* pixel() const
{
register int x = m_x;
register int y = m_y;
int x = m_x;
int y = m_y;
if(x < 0) x = 0;
if(y < 0) y = 0;
if(x >= (int)m_pixf->width()) x = m_pixf->width() - 1;
+5 -5
View File
@@ -278,7 +278,7 @@ namespace agg
//------------------------------------------------------------------------
inline void trans_affine::transform(double* x, double* y) const
{
register double tx = *x;
double tx = *x;
*x = tx * m0 + *y * m2 + m4;
*y = tx * m1 + *y * m3 + m5;
}
@@ -286,7 +286,7 @@ namespace agg
//------------------------------------------------------------------------
inline void trans_affine::transform_2x2(double* x, double* y) const
{
register double tx = *x;
double tx = *x;
*x = tx * m0 + *y * m2;
*y = tx * m1 + *y * m3;
}
@@ -294,9 +294,9 @@ namespace agg
//------------------------------------------------------------------------
inline void trans_affine::inverse_transform(double* x, double* y) const
{
register double d = determinant();
register double a = (*x - m4) * d;
register double b = (*y - m5) * d;
double d = determinant();
double a = (*x - m4) * d;
double b = (*y - m5) * d;
*x = a * m3 - b * m2;
*y = b * m0 - a * m1;
}
-139
View File
@@ -1,139 +0,0 @@
/*
* BeOS R5 compatible TTY module API
*
* Copyright 2008, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _TTY_TTYLAYER_H
#define _TTY_TTYLAYER_H
#include <module.h>
#include <termios.h>
// XXX: should go away or be opacised
struct str {
uchar *buffer;
uint bufsize, count, tail;
bool allocated;
};
struct ddrover {
};
struct ddomain {
struct ddrover *r;
bool bg;
bool locked;
};
#define ddbackground(d) ((d)->bg = true)
typedef bool (*tty_service_func)(struct tty *tty, struct ddrover *rover, uint op);
struct tty {
uint nopen;
uint flags;
struct ddomain dd;
struct ddomain ddi; // used in interrupt context
pid_t pgid;
struct termios t;
uint iactivity;
bool ibusy;
struct str istr;
struct str rstr;
struct str ostr;
struct winsize wsize;
tty_service_func service;
struct sel *sel;
struct tty *ttysel;
};
struct ttyfile {
struct tty *tty;
uint flags;
bigtime_t vtime;
};
// flags
#define TTYCARRIER (1 << 0)
#define TTYWRITABLE (1 << 1)
#define TTYWRITING (1 << 2)
#define TTYREADING (1 << 3)
#define TTYOSTOPPED (1 << 4)
#define TTYEXCLUSIVE (1 << 5)
#define TTYHWDCD (1 << 6)
#define TTYHWCTS (1 << 7)
#define TTYHWDSR (1 << 8)
#define TTYHWRI (1 << 9)
#define TTYFLOWFORCED (1 << 10)
// ops
#define TTYENABLE 0
#define TTYDISABLE 1
#define TTYSETMODES 2
#define TTYOSTART 3
#define TTYOSYNC 4
#define TTYISTOP 5
#define TTYIRESUME 6
#define TTYSETBREAK 7
#define TTYCLRBREAK 8
#define TTYSETDTR 9
#define TTYCLRDTR 10
#define TTYGETSIGNALS 11
typedef struct tty_module_info tty_module_info;
// this version is compatible with BeOS R5
struct tty_module_info_r5 {
// not a real bus manager... no rescan() !
module_info mi;
status_t (*ttyopen)(struct ttyfile *, struct ddrover *, tty_service_func);
status_t (*ttyclose)(struct ttyfile *, struct ddrover *);
status_t (*ttyfree)(struct ttyfile *, struct ddrover *);
status_t (*ttyread)(struct ttyfile *, struct ddrover *, char *, size_t *);
status_t (*ttywrite)(struct ttyfile *, struct ddrover *, const char *, size_t *);
status_t (*ttycontrol)(struct ttyfile *, struct ddrover *, ulong, void *, size_t);
void (*ttyinit)(struct tty *, bool);
void (*ttyilock)(struct tty *, struct ddrover *, bool );
void (*ttyhwsignal)(struct tty *, struct ddrover *, int, bool);
int (*ttyin)(struct tty *, struct ddrover *, int);
int (*ttyout)(struct tty *, struct ddrover *);
struct ddrover *(*ddrstart)(struct ddrover *);
void (*ddrdone)(struct ddrover *);
void (*ddacquire)(struct ddrover *, struct ddomain *);
};
// BeOS R5.1d0 has a different module with the same version...
// we exort this module as version 1.1 to allow using select from drivers
struct tty_module_info_dano {
// not a real bus manager... no rescan() !
module_info mi;
status_t (*ttyopen)(struct ttyfile *, struct ddrover *, tty_service_func);
status_t (*ttyclose)(struct ttyfile *, struct ddrover *);
status_t (*ttyfree)(struct ttyfile *, struct ddrover *);
status_t (*ttyread)(struct ttyfile *, struct ddrover *, char *, size_t *);
status_t (*ttywrite)(struct ttyfile *, struct ddrover *, const char *, size_t *);
status_t (*ttycontrol)(struct ttyfile *, struct ddrover *, ulong, void *, size_t);
status_t (*ttyselect)(struct ttyfile *, struct ddrover *, uint8, uint32, selectsync *);
status_t (*ttydeselect)(struct ttyfile *, struct ddrover *, uint8, selectsync *);
void (*ttyinit)(struct tty *, bool);
void (*ttyilock)(struct tty *, struct ddrover *, bool );
void (*ttyhwsignal)(struct tty *, struct ddrover *, int, bool);
int (*ttyin)(struct tty *, struct ddrover *, int);
int (*ttyout)(struct tty *, struct ddrover *);
struct ddrover *(*ddrstart)(struct ddrover *);
void (*ddrdone)(struct ddrover *);
void (*ddacquire)(struct ddrover *, struct ddomain *);
};
#define B_TTY_MODULE_NAME_R5 "bus_managers/tty/v1"
#define B_TTY_MODULE_NAME_DANO "bus_managers/tty/v1.1"
#define B_TTY_MODULE_NAME B_TTY_MODULE_NAME_DANO
#define tty_module_info tty_module_info_dano
#endif /* _TTY_TTYLAYER_H */
+3 -3
View File
@@ -109,7 +109,7 @@ void dbg_printf_end();
#define DEBUG_CONTEXT(x) \
{ \
dbg_printf_begin(); \
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", \
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", \
system_time(), DEBUG_THREAD); \
x; \
dbg_printf_end(); \
@@ -117,7 +117,7 @@ void dbg_printf_end();
#define DEBUG_CONTEXT_FUNCTION(prefix, x) \
{ \
dbg_printf_begin(); \
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s" prefix, \
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s" prefix, \
system_time(), DEBUG_THREAD, __PRETTY_FUNCTION__); \
x; \
dbg_printf_end(); \
@@ -125,7 +125,7 @@ void dbg_printf_end();
#define DEBUG_CONTEXT_LINE(x) \
{ \
dbg_printf_begin(); \
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s:%d: ", \
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s:%d: ", \
system_time(), DEBUG_THREAD, __PRETTY_FUNCTION__, __LINE__); \
x; \
dbg_printf_end(); \
+12 -12
View File
@@ -111,7 +111,7 @@ class BRegion::Support {
BRegion* pReg,
clipping_rect* r1,
clipping_rect* r1End,
register clipping_rect* r2,
clipping_rect* r2,
clipping_rect* r2End,
int top,
int bottom);
@@ -126,26 +126,26 @@ class BRegion::Support {
static void miRegionOp(BRegion* newReg,
const BRegion* reg1, const BRegion* reg2,
int (*overlapFunc)(
register BRegion* pReg,
register clipping_rect* r1,
BRegion* pReg,
clipping_rect* r1,
clipping_rect* r1End,
register clipping_rect* r2,
clipping_rect* r2,
clipping_rect* r2End,
int top,
int bottom),
int (*nonOverlap1Func)(
register BRegion* pReg,
register clipping_rect* r,
BRegion* pReg,
clipping_rect* r,
clipping_rect* rEnd,
register int top,
register int bottom),
int top,
int bottom),
int (*nonOverlap2Func)(
register BRegion* pReg,
register clipping_rect* r,
BRegion* pReg,
clipping_rect* r,
clipping_rect* rEnd,
register int top,
register int bottom));
int top,
int bottom));
};
+5 -2
View File
@@ -77,8 +77,11 @@ typedef struct arch_cpu_info {
extern "C" {
#endif
extern addr_t arm_get_far(void);
extern int32 arm_get_fsr(void);
extern uint32 arm_get_dfsr(void);
extern uint32 arm_get_ifsr(void);
extern addr_t arm_get_dfar(void);
extern addr_t arm_get_ifar(void);
extern addr_t arm_get_fp(void);
extern int mmu_read_c1(void);
@@ -14,10 +14,15 @@ struct iframe_stack {
int32 index;
};
struct arch_fpu_context {
uint64_t fp_regs[32];
uint32_t fpscr;
};
// architecture specific thread info
struct arch_thread {
void *sp; // stack pointer
void *interrupt_stack;
struct arch_fpu_context fpuContext;
// used to track interrupts on this thread
struct iframe_stack iframes;
@@ -43,6 +48,9 @@ extern "C" {
#endif
void arch_return_to_userland(struct iframe *);
void arm_context_switch(struct arch_thread* from, struct arch_thread* to);
void arm_save_fpu(struct arch_fpu_context* context);
void arm_restore_fpu(struct arch_fpu_context* context);
#ifdef __cplusplus
}
@@ -22,7 +22,7 @@
#define KERNEL_LOAD_BASE_32_BIT 0x80000000
#define KERNEL_LOAD_BASE_64_BIT 0xffffffff80000000ll
#define KERNEL_FIXUP_FOR_LONG_MODE (KERNEL_LOAD_BASE_64_BIT - KERNEL_LOAD_BASE_32_BIT)
#elif __x86_64__
#elif defined(__x86_64__)
#define KERNEL_LOAD_BASE 0xffffffff80000000ll
#else
#define KERNEL_LOAD_BASE 0x80000000
@@ -1,86 +0,0 @@
//----------------------------------------------------------------------
// This software is part of the Haiku distribution and is covered
// by the MIT License.
//---------------------------------------------------------------------
#ifndef _DISK_SCANNER_ADD_ON
#define _DISK_SCANNER_ADD_ON
#include <SupportDefs.h>
class BDiskScannerParameterEditor;
class BPartition;
class BSession;
class BString;
class BView;
// BDiskScannerPartitionAddOn
class BDiskScannerPartitionAddOn {
public:
BDiskScannerPartitionAddOn();
virtual ~BDiskScannerPartitionAddOn();
virtual const char *ShortName() = 0;
virtual const char *LongName() = 0;
virtual BDiskScannerParameterEditor *CreateEditor(const BSession *session,
const char *parameters) = 0;
private:
virtual void _ReservedDiskScannerPartitionAddOn1();
virtual void _ReservedDiskScannerPartitionAddOn2();
virtual void _ReservedDiskScannerPartitionAddOn3();
virtual void _ReservedDiskScannerPartitionAddOn4();
virtual void _ReservedDiskScannerPartitionAddOn5();
uint32 _reserved[8];
};
// BDiskScannerFSAddOn
class BDiskScannerFSAddOn {
public:
BDiskScannerFSAddOn();
virtual ~BDiskScannerFSAddOn();
virtual const char *ShortName() = 0;
virtual const char *LongName() = 0;
virtual BDiskScannerParameterEditor *CreateEditor(
const BPartition *partition, const char *parameters) = 0;
private:
virtual void _ReservedDiskScannerFSAddOn1();
virtual void _ReservedDiskScannerFSAddOn2();
virtual void _ReservedDiskScannerFSAddOn3();
virtual void _ReservedDiskScannerFSAddOn4();
virtual void _ReservedDiskScannerFSAddOn5();
uint32 _reserved[8];
};
// BDiskScannerParameterEditor
class BDiskScannerParameterEditor {
public:
BDiskScannerParameterEditor();
virtual ~BDiskScannerParameterEditor();
virtual BView *View();
virtual bool EditingDone();
virtual status_t GetParameters(BString *parameters);
private:
virtual void _ReservedDiskScannerParameterEditor1();
virtual void _ReservedDiskScannerParameterEditor2();
virtual void _ReservedDiskScannerParameterEditor3();
virtual void _ReservedDiskScannerParameterEditor4();
virtual void _ReservedDiskScannerParameterEditor5();
uint32 _reserved[8];
};
// partition add-ons
extern "C" BDiskScannerPartitionAddOn *create_ds_partition_add_on();
// fs add-ons
extern "C" BDiskScannerFSAddOn *create_ds_fs_add_on();
#endif // _DISK_SCANNER_ADD_ON
@@ -13,7 +13,11 @@
#define CPSR_MODE_MASK 0x1f
#define CPSR_MODE_USR 0x10
#define CPSR_MODE_FIQ 0x11
#define CPSR_MODE_IRQ 0x12
#define CPSR_MODE_SVC 0x13
#define CPSR_MODE_ABT 0x17
#define CPSR_MODE_UND 0x1b
#define CPSR_MODE_SYS 0x1f
#define CPSR_T 0x20
@@ -21,5 +25,10 @@
#define CPSR_I 0x80
#define FSR_WNR 0x800
#define FSR_LPAE 0x200
#define FSR_FS_ALIGNMENT_FAULT 0x01
#define FSR_FS_PERMISSION_FAULT_L1 0x0d
#define FSR_FS_PERMISSION_FAULT_L2 0x0f
#endif /* _SYSTEM_ARCH_ARM_DEFS_H */
-13
View File
@@ -37,11 +37,6 @@
extern "C" {
#endif
#ifdef HAS_FUSE_HAIKU_EXTENSIONS
struct fs_info;
extern int gHasHaikuFuseExtensions;
#endif
/* ----------------------------------------------------------- *
* Basic FUSE API *
@@ -459,10 +454,6 @@ struct fuse_operations {
*/
int (*bmap) (const char *, size_t blocksize, uint64_t *idx);
#ifdef HAS_FUSE_HAIKU_EXTENSIONS
int (*get_fs_info) (struct fs_info*);
#endif
/**
* Flag indicating that the filesystem can accept a NULL path
* as the first argument for the following operations:
@@ -903,10 +894,6 @@ void fuse_fs_destroy(struct fuse_fs *fs);
int fuse_notify_poll(struct fuse_pollhandle *ph);
#ifdef HAS_FUSE_HAIKU_EXTENSIONS
int fuse_fs_get_fs_info(struct fuse_fs* fs, struct fs_info* info);
#endif
/**
* Create a new fuse filesystem object
*
@@ -113,6 +113,12 @@ struct fuse_file_info {
#define FUSE_CAP_FLOCK_LOCKS (1 << 10)
#define FUSE_CAP_IOCTL_DIR (1 << 11)
/* Indicate support for Haiku-specific extensions in struct fuse_operations and fuse_ll_ops */
#define FUSE_CAP_HAIKU_FUSE_EXTENSIONS (1 << 31)
#define FUSE_HAIKU_GET_DRIVE_INFO (((uint32_t)'H' << 24) | ((uint32_t)'G' << 16) \
| ((uint32_t)'D' << 8) | (uint32_t)'I')
/**
* Ioctl flags
*
+3 -3
View File
@@ -91,13 +91,13 @@ void dbg_printf_end();
#endif
#define DEBUG_THREAD find_thread(NULL)
#define DEBUG_CONTEXT(x) { dbg_printf_begin(); __out(DEBUG_APP " [%" \
#define DEBUG_CONTEXT(x) { dbg_printf_begin(); __out(DEBUG_APP ": [%" \
B_PRIdBIGTIME ": %5" B_PRId32 "] ", system_time(), DEBUG_THREAD); \
x; dbg_printf_end(); }
#define DEBUG_CONTEXT_FUNCTION(prefix, x) { dbg_printf_begin(); \
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s()" prefix, \
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s()" prefix, \
system_time(), DEBUG_THREAD, __FUNCTION__); x; dbg_printf_end(); }
#define DEBUG_CONTEXT_LINE(x) { dbg_printf_begin(); __out(DEBUG_APP " [%" \
#define DEBUG_CONTEXT_LINE(x) { dbg_printf_begin(); __out(DEBUG_APP ": [%" \
B_PRIdBIGTIME ": %5" B_PRId32 "] %s():%d: ", system_time(), \
DEBUG_THREAD, __FUNCTION__, __LINE__); x; dbg_printf_end(); }