perf trace/scripting: Don't display 'scripting unsupported' msg unnecessarily

The 'scripting unsupported' message should only be displayed
when the -s or -g options are used, and not when they aren't, as
the current code does.

Signed-off-by: Tom Zanussi <ca42f6846873622f2a6dc51a5106ba83ffbdaf95@gmail.com>
Cc: 43232e92d70cc7aa53504ad0397085ee47bad87f@goodmis.org
Cc: Peter Zijlstra <645ca7d3a8d3d4f60557176cd361ea8351edc32b@chello.nl>
Cc: Mike Galbraith <3cfa3897b7f55b5396b7a47c83b66325184bc9b4@gmx.de>
Cc: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>
Cc: Arnaldo Carvalho de Melo <293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com>
Cc: Frederic Weisbecker <e8a1bf9163cb25e93cfd6540f223b3872ea7ee55@gmail.com>
LKML-Reference: <1260163919-6679-3-git-send-email-ca42f6846873622f2a6dc51a5106ba83ffbdaf95@gmail.com>
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>

--- tools/perf/util/trace-event-perl.c
+++ tools/perf/util/trace-event-perl.c
@@ -570,26 +570,72 @@
 	.generate_script = perl_generate_script,
 };

+static void print_unsupported_msg(void)
+{
+	fprintf(stderr, "Perl scripting not supported."
+		"  Install libperl and rebuild perf to enable it.\n"
+		"For example:\n  # apt-get install libperl-dev (ubuntu)"
+		"\n  # yum install perl-ExtUtils-Embed (Fedora)"
+		"\n  etc.\n");
+}
+
+static int perl_start_script_unsupported(const char *script __unused)
+{
+	print_unsupported_msg();
+
+	return -1;
+}
+
+static int perl_stop_script_unsupported(void)
+{
+	return 0;
+}
+
+static void perl_process_event_unsupported(int cpu __unused,
+					   void *data __unused,
+					   int size __unused,
+					   unsigned long long nsecs __unused,
+					   char *comm __unused)
+{
+}
+
+static int perl_generate_script_unsupported(const char *outfile __unused)
+{
+	print_unsupported_msg();
+
+	return -1;
+}
+
+struct scripting_ops perl_scripting_unsupported_ops = {
+	.name = "Perl",
+	.start_script = perl_start_script_unsupported,
+	.stop_script = perl_stop_script_unsupported,
+	.process_event = perl_process_event_unsupported,
+	.generate_script = perl_generate_script_unsupported,
+};
+
+static void register_perl_scripting(struct scripting_ops *scripting_ops)
+{
+	int err;
+	err = script_spec_register("Perl", scripting_ops);
+	if (err)
+		die("error registering Perl script extension");
+
+	err = script_spec_register("pl", scripting_ops);
+	if (err)
+		die("error registering pl script extension");
+
+	scripting_context = malloc(sizeof(struct scripting_context));
+}
+
 #ifdef NO_LIBPERL
 void setup_perl_scripting(void)
 {
-	fprintf(stderr, "Perl scripting not supported."
-		"  Install libperl and rebuild perf to enable it.  e.g. "
-		"apt-get install libperl-dev (ubuntu), yum install "
-		"perl-ExtUtils-Embed (Fedora), etc.\n");
+	register_perl_scripting(&perl_scripting_unsupported_ops);
 }
 #else
 void setup_perl_scripting(void)
 {
-	int err;
-	err = script_spec_register("Perl", &perl_scripting_ops);
-	if (err)
-		die("error registering Perl script extension");
-
-	err = script_spec_register("pl", &perl_scripting_ops);
-	if (err)
-		die("error registering pl script extension");
-
-	scripting_context = malloc(sizeof(struct scripting_context));
+	register_perl_scripting(&perl_scripting_ops);
 }
 #endif


crank version #

crank version #

--- arch/hppa/stand/boot/conf.c
+++ arch/hppa/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: conf.c,v 1.20 2007/12/26 18:52:59 kettenis Exp $	*/
+/*	$OpenBSD: conf.c,v 1.21 2008/03/04 22:33:11 deraadt Exp $	*/

 /*
  * Copyright (c) 1998-2004 Michael Shalayeff
@@ -32,7 +32,7 @@
 #include <lib/libsa/cd9660.h>
 #include <dev/cons.h>

-const char version[] = "0.9";
+const char version[] = "1.0";
 int	debug = 0;

 struct fs_ops file_system[] = {


Fix intrstray a bit again.

Fix intrstray a bit again.

--- arch/i386/isa/isa_machdep.c
+++ arch/i386/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: isa_machdep.c,v 1.10 1996/04/18 17:12:16 niklas Exp $	*/
+/*	$OpenBSD: isa_machdep.c,v 1.11 1996/04/19 05:41:52 mickey Exp $	*/
 /*	$NetBSD: isa_machdep.c,v 1.11 1996/02/28 01:49:35 cgd Exp $	*/

 /*-
@@ -125,19 +125,15 @@
 isa_strayintr(irq)
 	int irq;
 {
-	static u_long strays;
-
-	intrstray[irq]++;
-
         /*
          * Stray interrupts on irq 7 occur when an interrupt line is raised
          * and then lowered before the CPU acknowledges it.  This generally
          * means either the device is screwed or something is cli'ing too
          * long and it's timing out.
          */
-	if (++strays <= 5)
+	if (++intrstray[irq] <= 5)
 		log(LOG_ERR, "stray interrupt %d%s\n", irq,
-		    strays >= 5 ? "; stopped logging" : "");
+		    intrstray[irq] >= 5 ? "; stopped logging" : "");
 }

 int fastvec;


MIPS: Fix CP0 COUNTER clockevent race

MIPS: Fix CP0 COUNTER clockevent race

Consider the following test case:

write_c0_compare(read_c0_count());

Even if the counter doesn't increment during execution, this might not
generate an interrupt until the counter wraps around.  The CPU may
perform the comparison each time CP0 COUNT increments, not when CP0
COMPARE is written.

If mips_next_event() is called with a very small delta, and CP0 COUNT
increments during the calculation of "cnt += delta", it is possible
that CP0 COMPARE will be written with the current value of CP0 COUNT.
If this is detected, the function should return -ETIME, to indicate
that the interrupt might not have actually gotten scheduled.

Signed-off-by: Kevin Cernekee <3105dbb3dd63fbb4f6371cfb04adc6726f76c56b@gmail.com>
Cc: 562397917b9a8bf316569a848858b12fb417723f@linux-mips.org
Cc: 2578944098299abf708b08eff6fcf60565553586@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1836/
Signed-off-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>

--- arch/mips/kernel/cevt-r4k.c
+++ arch/mips/kernel/cevt-r4k.c
@@ -32,7 +32,7 @@
 	cnt = read_c0_count();
 	cnt += delta;
 	write_c0_compare(cnt);
-	res = ((int)(read_c0_count() - cnt) > 0) ? -ETIME : 0;
+	res = ((int)(read_c0_count() - cnt) >= 0) ? -ETIME : 0;
 	return res;
 }


MIPS: cevt-r4k: Make interrupt handler shared

Make the cevt-r4k interrupt handler shared so that other interrupt
handlers (specifically the performance counter overflow handler and fast
debug channel interrupt handler) can share the same interrupt line.

This simply imvolves returning IRQ_NONE when no timer interrupt has been
handled to allow other handlers to run, and passing IRQF_SHARED when
setting up the IRQ handler so that other handlers (with compatible
flags) can be registered.

Signed-off-by: James Hogan <547fa85bb3888a0222eed8ec39e36708605c6d53@imgtec.com>
Cc: 562397917b9a8bf316569a848858b12fb417723f@linux-mips.org
Cc: 2578944098299abf708b08eff6fcf60565553586@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/9128/
Signed-off-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>


Correctly configure ccd(4).

Correctly configure ccd(4).

--- arch/mvme68k/mvme68k/conf.c
+++ arch/mvme68k/mvme68k/conf.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: conf.c,v 1.27 2002/04/28 01:05:44 miod Exp $ */
+/*	$OpenBSD: conf.c,v 1.28 2002/04/28 14:48:29 miod Exp $ */

 /*-
  * Copyright (c) 1995 Theo de Raadt
@@ -182,8 +182,8 @@
 	cdev_tty_init(NBUGTTY,bugtty),	/* 14: BUGtty (ttyB) */
 	cdev_notdef(),			/* 15 */
 	cdev_notdef(),			/* 16 */
-	cdev_notdef(),			/* 17: concatenated disk */
-        cdev_disk_init(NRD,rd),         /* 18: ramdisk device */
+	cdev_disk_init(NCCD,ccd),	/* 17: concatenated disk */
+	cdev_disk_init(NRD,rd),		/* 18: ramdisk device */
 	cdev_disk_init(NVND,vnd),	/* 19: vnode disk */
 	cdev_tape_init(NST,st),		/* 20: SCSI tape */
 	cdev_fd_init(1,filedesc),	/* 21: file descriptor pseudo-dev */


pass VM_PROT_READ/VM_PROT_WRITE as si_trapno for SIGSEGV

--- arch/mvme68k/mvme68k/trap.c
+++ arch/mvme68k/mvme68k/trap.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: trap.c,v 1.11 1997/02/04 02:49:24 deraadt Exp $ */
+/*	$OpenBSD: trap.c,v 1.12 1997/02/04 12:29:20 deraadt Exp $ */

 /*
  * Copyright (c) 1995 Theo de Raadt
@@ -237,7 +237,8 @@
 		} else if (sig = writeback(fp, fromtrap)) {
 			beenhere = 1;
 			oticks = p->p_sticks;
-			trapsignal(p, sig, T_MMUFLT, SEGV_MAPERR, (caddr_t)faultaddr);
+			trapsignal(p, sig, VM_PROT_WRITE, SEGV_MAPERR,
+			    (caddr_t)faultaddr);
 			goto again;
 		}
 	}
@@ -639,7 +640,7 @@
 			goto dopanic;
 		}
 		frame.f_pad = code & 0xffff;
-		ucode = T_MMUFLT;
+		ucode = ftype;
 		typ = SEGV_MAPERR;
 		i = SIGSEGV;
 		break;


powerpc/kdump: Delay before sending IPI on a system reset

If we enter the kdump code via system reset, wait a bit before
sending the IPI to capture all secondary CPUs. Without it we race
with the hypervisor that is issuing the system reset to each CPU.
If the IPI gets there first the system reset oops output then shows
the register state of the IPI handler which is not what we want.

I took the opportunity to add defines for all the various delays
we have. There's no need for cpu_relax when we are doing an mdelay,
so remove them too.

Signed-off-by: Anton Blanchard <14deb5e5e417133e888bf47bb6a3555c9bb7d81c@samba.org>
Signed-off-by: Benjamin Herrenschmidt <a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org>

--- arch/powerpc/kernel/crash.c
+++ arch/powerpc/kernel/crash.c
@@ -30,6 +30,20 @@
 #include <asm/system.h>
 #include <asm/setjmp.h>

+/*
+ * The primary CPU waits a while for all secondary CPUs to enter. This is to
+ * avoid sending an IPI if the secondary CPUs are entering
+ * crash_kexec_secondary on their own (eg via a system reset).
+ *
+ * The secondary timeout has to be longer than the primary. Both timeouts are
+ * in milliseconds.
+ */
+#define PRIMARY_TIMEOUT		500
+#define SECONDARY_TIMEOUT	1000
+
+#define IPI_TIMEOUT		10000
+#define REAL_MODE_TIMEOUT	10000
+
 /* This keeps a track of which one is the crashing cpu. */
 int crashing_cpu = -1;
 static cpumask_t cpus_in_crash = CPU_MASK_NONE;
@@ -99,11 +113,9 @@
 	 * FIXME: Until we will have the way to stop other CPUs reliably,
 	 * the crash CPU will send an IPI and wait for other CPUs to
 	 * respond.
-	 * Delay of at least 10 seconds.
-	 */
-	msecs = 10000;
+	 */
+	msecs = IPI_TIMEOUT;
 	while ((cpumask_weight(&cpus_in_crash) < ncpus) && (--msecs > 0)) {
-		cpu_relax();
 		mdelay(1);
 	}

@@ -163,11 +175,11 @@
 void crash_kexec_secondary(struct pt_regs *regs)
 {
 	unsigned long flags;
-	int msecs = 500;
+	int msecs = SECONDARY_TIMEOUT;

 	local_irq_save(flags);

-	/* Wait 500ms for the primary crash CPU to signal its progress */
+	/* Wait for the primary crash CPU to signal its progress */
 	while (crashing_cpu < 0) {
 		if (--msecs < 0) {
 			/* No response, kdump image may not have been loaded */
@@ -176,7 +188,6 @@
 		}

 		mdelay(1);
-		cpu_relax();
 	}

 	crash_ipi_callback(regs);
@@ -211,7 +222,7 @@
 	unsigned int msecs;
 	int i;

-	msecs = 10000;
+	msecs = REAL_MODE_TIMEOUT;
 	for (i=0; i < nr_cpu_ids && msecs > 0; i++) {
 		if (i == cpu)
 			continue;
@@ -306,6 +317,14 @@
 	 */
 	crashing_cpu = smp_processor_id();
 	crash_save_cpu(regs, crashing_cpu);
+
+	/*
+	 * If we came in via system reset, wait a while for the secondary
+	 * CPUs to enter.
+	 */
+	if (TRAP(regs) == 0x100)
+		mdelay(PRIMARY_TIMEOUT);
+
 	crash_kexec_prepare_cpus(crashing_cpu);
 	cpumask_set_cpu(crashing_cpu, &cpus_in_crash);
 	crash_kexec_wait_realmode(crashing_cpu);


powerpc: Convert sysfs cache code to of_find_next_cache_node()

Using the common code means that more complete cache information will
provided in sysfs on platforms that don't use the l2-cache property
convention.

Signed-off-by: Nathan Lynch <e04de97a81056a5c7ecb3646886e1cc27299320d@pobox.com>
Signed-off-by: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>

--- arch/powerpc/kernel/sysfs.c
+++ arch/powerpc/kernel/sysfs.c
@@ -566,7 +566,6 @@

 static struct cache_desc * __cpuinit create_cache_index_info(struct device_node *np, struct kobject *parent, int index, int level)
 {
-	const phandle *next_cache_phandle;
 	struct device_node *next_cache;
 	struct cache_desc *new, **end;

@@ -591,11 +590,7 @@
 	while (*end)
 		end = &(*end)->next;

-	next_cache_phandle = of_get_property(np, "l2-cache", NULL);
-	if (!next_cache_phandle)
-		goto out;
-
-	next_cache = of_find_node_by_phandle(*next_cache_phandle);
+	next_cache = of_find_next_cache_node(np);
 	if (!next_cache)
 		goto out;


Add example wher eone variable is involved in partitioning two arrays

--- toy_examples_michael/handwritten.c
+++ toy_examples_michael/handwritten.c
@@ -12,6 +12,7 @@
   example10();
   example11();
   example12();
+  example13();
 }

 // Simple example
@@ -183,4 +184,15 @@
   int x = a[5];
   int y = a[1];
   int z = a[i-1];
-}+}
+
+// Example having to arrays partitioned according to one expression
+void example13(void) {
+  int a[42];
+  int b[42];
+
+  for(int i=0; i<42;i++) {
+    a[i] = 2;
+    b[41-i] = 0;
+  }
+}


powerpc: Fix handling of DSCR related facility unavailable exception

Currently DSCR (Data Stream Control Register) can be accessed with
mfspr or mtspr instructions inside a thread via two different SPR
numbers. One being the user accessible problem state SPR number 0x03
and the other being the privilege state SPR number 0x11. All access
through the privilege state SPR number get emulated through illegal
instruction exception. Any access through the problem state SPR number
raises one facility unavailable exception which sets the thread based
dscr_inherit bit and enables DSCR facility through FSCR register thus
allowing direct access to DSCR without going through this exception in
the future. We set the thread.dscr_inherit bit whether the access was
with mfspr or mtspr instruction which is neither correct nor does it
match the behaviour through the instruction emulation code path driven
from privilege state SPR number. User currently observes two different
kind of behaviour when accessing the DSCR through these two SPR numbers.
This problem can be observed through these two test cases by replacing
the privilege state SPR number with the problem state SPR number.

	(1) http://ozlabs.org/~anton/junkcode/dscr_default_test.c
	(2) http://ozlabs.org/~anton/junkcode/dscr_explicit_test.c

This patch fixes the problem by making sure that the behaviour visible
to the user remains the same irrespective of which SPR number is being
used. Inside facility unavailable exception, we check whether it was
cuased by a mfspr or a mtspr isntrucction. In case of mfspr instruction,
just emulate the instruction. In case of mtspr instruction, set the
thread based dscr_inherit bit and also enable the facility through FSCR.
All user SPR based mfspr instruction will be emulated till one user SPR
based mtspr has been executed.

Signed-off-by: Anshuman Khandual <5cc840ad174e421baefc61e26aff2d5fb1883945@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <864f124608374e06e4da1fa5d2e47ed839b95411@ellerman.id.au>


sh, perf: Use common PMU interrupt disabled code

Transition to using the new generic PERF_PMU_CAP_NO_INTERRUPT method for
failing a sampling event when no PMU interrupt is available.

Signed-off-by: Vince Weaver <b486a64568929e3535e394c7ca98794b49f6ab74@maine.edu>
Signed-off-by: Peter Zijlstra <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Arnaldo Carvalho de Melo <293abb6b76d7791c0732cc517d38c4b5c734b87f@kernel.org>
Cc: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>
Cc: 44787936a129ada0ae74fc72686d393c1cd5ee40@vger.kernel.org
Link: d63b45c059dd22e163ddf04791762aee92d09816@vincent-weaver-1.umelst.maine.edu
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>


va is of type vaddr_t; allow sparc64 to build with DEBUG

ok miod@

--- arch/sparc64/sparc64/pmap.c
+++ arch/sparc64/sparc64/pmap.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: pmap.c,v 1.75 2011/09/22 17:41:00 jasper Exp $	*/
+/*	$OpenBSD: pmap.c,v 1.76 2012/04/26 21:32:20 okan Exp $	*/
 /*	$NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $	*/
 #undef	NO_VCACHE /* Don't forget the locked TLB in dostart */
 /*
@@ -2077,7 +2077,7 @@

 #ifdef DEBUG
 	/* Trap mapping of page zero */
-	if (va == NULL) {
+	if (va == 0) {
 		prom_printf("pmap_enter: NULL va=%08x pa=%x:%08x\r\n",
 			    va, (int)(pa>>32), (int)pa);
 		OF_enter();
@@ -3659,7 +3659,7 @@

 	/* Allocate a page */
 	va = (vaddr_t)(vmmap - NBPG);
-	KDASSERT(va != NULL);
+	KDASSERT(va != 0);
 	loc = (int *)va;

 	pmap_get_page(&pa, NULL, pmap_kernel());


applied trivial fix for eq3_char_loop kernel driver which was outputting some "unhandled ioctl" messages for unsupported ioctl() calls. This fixes #35.

--- buildroot-external/package/eq3_char_loop/eq3_char_loop.c
+++ buildroot-external/package/eq3_char_loop/eq3_char_loop.c
@@ -533,6 +533,13 @@
 		break;
 	case TIOCMSET:
 		break;
+	case TIOCSERGETLSR:
+		temp = N_TTY;
+		ret = __put_user( temp, (int*)arg );
+		break;
+	case TIOCGICOUNT:
+		return -ENOTTY;
+		break;
 	default:
 		ret = -ENOTTY;
 		break;


arch/tile: remove inline marking of EXPORT_SYMBOL functions

EXPORT_SYMBOL and inline directives are contradictory to each other.
The patch fixes this inconsistency.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Denis Efremov <789ad2c8424b80675d81dd76da4a1e7cb4ffbd12@gmail.com>
Signed-off-by: Chris Metcalf <074881f6f5da4d3b5278870ff234d1077ee622c0@tilera.com>

--- arch/tile/lib/spinlock_32.c
+++ arch/tile/lib/spinlock_32.c
@@ -101,7 +101,7 @@
  * preserve the semantic that the same read lock can be acquired in an
  * interrupt context.
  */
-inline int arch_read_trylock(arch_rwlock_t *rwlock)
+int arch_read_trylock(arch_rwlock_t *rwlock)
 {
 	u32 val;
 	__insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 1);


[PATCH] uml: fix advanced sysemu check

[PATCH] uml: fix advanced sysemu check

cleanup and fix the check for advanced sysemu (PTRACE_SYSEMU_SINGLESTEP
option)

Signed-off-by: Bodo Stroesser <dddb87307dd3bcbdd59b6f400c50a7f34e54a5a5@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <f9b6309e85863eba5d28138b6a0f35841ce976d0@addtoit.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@osdl.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@osdl.org>

--- arch/um/os-Linux/start_up.c
+++ arch/um/os-Linux/start_up.c
@@ -161,7 +161,7 @@
 static void __init check_sysemu(void)
 {
 	void *stack;
-	int pid, syscall, n, status, count=0;
+ 	int pid, n, status, count=0;

 	printk("Checking syscall emulation patch for ptrace...");
 	sysemu_supported = 0;
@@ -192,6 +192,12 @@

 	printk("Checking advanced syscall emulation patch for ptrace...");
 	pid = start_ptraced_child(&stack);
+
+	if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0,
+		  (void *) PTRACE_O_TRACESYSGOOD) < 0)
+		panic("check_ptrace: PTRACE_OLDSETOPTIONS failed, errno = %d",
+		      errno);
+
 	while(1){
 		count++;
 		if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0)
@@ -199,15 +205,10 @@
 		CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
 		if(n < 0)
 			panic("check_ptrace : wait failed, errno = %d", errno);
-		if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP))
-			panic("check_ptrace : expected (SIGTRAP|SYSCALL_TRAP), "
-			      "got status = %d", status);
-
-		syscall = ptrace(PTRACE_PEEKUSR, pid, PT_SYSCALL_NR_OFFSET,
-				 0);
-		if(syscall == __NR_getpid){
+		if(WIFSTOPPED(status) && (WSTOPSIG(status) == (SIGTRAP|0x80))){
 			if (!count)
-				panic("check_ptrace : SYSEMU_SINGLESTEP doesn't singlestep");
+				panic("check_ptrace : SYSEMU_SINGLESTEP "
+				      "doesn't singlestep");
 			n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET,
 				   os_getpid());
 			if(n < 0)
@@ -215,6 +216,11 @@
 				      "call return, errno = %d", errno);
 			break;
 		}
+		else if(WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP))
+			count++;
+		else
+			panic("check_ptrace : expected SIGTRAP or "
+			      "(SIGTRAP|0x80), got status = %d", status);
 	}
 	if (stop_ptraced_child(pid, stack, 0, 0) < 0)
 		goto fail_stopped;
@@ -250,8 +256,8 @@
 		CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
 		if(n < 0)
 			panic("check_ptrace : wait failed, errno = %d", errno);
-		if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP + 0x80))
-			panic("check_ptrace : expected SIGTRAP + 0x80, "
+		if(!WIFSTOPPED(status) || (WSTOPSIG(status) != (SIGTRAP|0x80)))
+			panic("check_ptrace : expected (SIGTRAP|0x80), "
 			      "got status = %d", status);

 		syscall = ptrace(PTRACE_PEEKUSR, pid, PT_SYSCALL_NR_OFFSET,


x86, tools: Fix up compiler warnings

x86, tools: Fix up compiler warnings

The kbuild test robot reported the following errors that were introduced
with commit 993c30a04e20 ("x86, tools: Consolidate #ifdef code"),

  arch/x86/boot/tools/build.c: In function 'update_pecoff_setup_and_reloc':
>> arch/x86/boot/tools/build.c:252:1: error: parameter name omitted
    static inline void update_pecoff_setup_and_reloc(unsigned int) {}
    ^
  arch/x86/boot/tools/build.c: In function 'update_pecoff_text':
>> arch/x86/boot/tools/build.c:253:1: error: parameter name omitted
    static inline void update_pecoff_text(unsigned int, unsigned int) {}
    ^
>> arch/x86/boot/tools/build.c:253:1: error: parameter name omitted

   arch/x86/boot/tools/build.c: In function 'main':
>> arch/x86/boot/tools/build.c:372:2: warning: implicit declaration of function 'efi_stub_entry_update' [-Wimplicit-function-declaration]
    efi_stub_entry_update();
    ^
Signed-off-by: Matt Fleming <b02f0790d66a0f0a6b369873bf6df37420fbe5dd@intel.com>


x86/amd-iommu: Introduce iommu_flush_device() function

This patch adds a function to flush a DTE entry for a given
struct device and replaces iommu_queue_inv_dev_entry calls
with this function where appropriate.

Signed-off-by: Joerg Roedel <ebd221a096cbc71dd9e1991db28795933c85f380@amd.com>

--- arch/x86/kernel/amd_iommu.c
+++ arch/x86/kernel/amd_iommu.c
@@ -494,6 +494,17 @@
 	return ret;
 }

+static int iommu_flush_device(struct device *dev)
+{
+	struct amd_iommu *iommu;
+	u16 devid;
+
+	devid = get_device_id(dev);
+	iommu = amd_iommu_rlookup_table[devid];
+
+	return iommu_queue_inv_dev_entry(iommu, devid);
+}
+
 static void __iommu_build_inv_iommu_pages(struct iommu_cmd *cmd, u64 address,
 					  u16 domid, int pde, int s)
 {
@@ -1382,7 +1393,7 @@
 	domain->dev_cnt                 += 1;

 	/* Flush the DTE entry */
-	iommu_queue_inv_dev_entry(iommu, devid);
+	iommu_flush_device(dev);
 }

 static void do_detach(struct device *dev)
@@ -1405,7 +1416,7 @@
 	clear_dte_entry(devid);

 	/* Flush the DTE entry */
-	iommu_queue_inv_dev_entry(iommu, devid);
+	iommu_flush_device(dev);
 }

 /*
@@ -1610,7 +1621,7 @@
 		goto out;
 	}

-	iommu_queue_inv_dev_entry(iommu, devid);
+	iommu_flush_device(dev);
 	iommu_completion_wait(iommu);

 out:
@@ -2393,7 +2404,7 @@
 	if (!iommu)
 		return;

-	iommu_queue_inv_dev_entry(iommu, devid);
+	iommu_flush_device(dev);
 	iommu_completion_wait(iommu);
 }


x86: Remove unused variable disable_x2apic

setup_nox2apic() is writing 1 to disable_x2apic but no one is reading it.

Signed-off-by: Jaswinder Singh Rajput <0599c1aba1ea3f0bcaf4115dd8076db98ee6d35c@gmail.com>
Cc: Yinghai Lu <0674548f4d596393408a51d6287a76ebba2f42aa@kernel.org>
Cc: Cyrill Gorcunov <7a1ea01eee6961eb1e372e3508c2670446d086f4@gmail.com>
LKML-Reference: <df3d980b1004b9086192354dba3dcb4676c0e040@jaswinder.satnam>
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>

--- arch/x86/kernel/apic/apic.c
+++ arch/x86/kernel/apic/apic.c
@@ -140,7 +140,6 @@
 #ifdef CONFIG_X86_X2APIC
 /* x2apic enabled before OS handover */
 static int x2apic_preenabled;
-static int disable_x2apic;
 static __init int setup_nox2apic(char *str)
 {
 	if (x2apic_enabled()) {
@@ -149,7 +148,6 @@
 		return 0;
 	}

-	disable_x2apic = 1;
 	setup_clear_cpu_cap(X86_FEATURE_X2APIC);
 	return 0;
 }


x86: bpf_jit_comp: Remove inline from static function definitions

Let the compiler decide instead.

No change in object size x86-64 -O2 no profiling

Signed-off-by: Joe Perches <16a9a54ddf4259952e3c118c763138e83693d7fd@perches.com>
Suggested-by: Eric Dumazet <a0baddf32b28d2f9429941ed4af2fe636e210591@gmail.com>
Acked-by: Alexei Starovoitov <c24c0248770ae98831f8a654310d4c2e07514c61@plumgrid.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>


There are many places in libdtrace where errno can be set. When an
error is returned all the way back to the dtrace app, it's hard to
figure out where that error came from.

Add a couple of functions to get and set the error location which can
be optionally compiled into the library.

--- cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c
+++ cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c
@@ -25,6 +25,7 @@

 #pragma ident	"%Z%%M%	%I%	%E% SMI"

+#include <string.h>
 #include <strings.h>
 #include <dt_impl.h>

@@ -138,12 +139,29 @@
 	return (dtp->dt_errno);
 }

+#if defined(sun)
 int
 dt_set_errno(dtrace_hdl_t *dtp, int err)
 {
 	dtp->dt_errno = err;
 	return (-1);
 }
+#else
+int
+_dt_set_errno(dtrace_hdl_t *dtp, int err, const char *errfile, int errline)
+{
+	dtp->dt_errno = err;
+	dtp->dt_errfile = errfile;
+	dtp->dt_errline = errline;
+	return (-1);
+}
+
+void dt_get_errloc(dtrace_hdl_t *dtp, const char **p_errfile, int *p_errline)
+{
+	*p_errfile = dtp->dt_errfile;
+	*p_errline = dtp->dt_errline;
+}
+#endif

 void
 dt_set_errmsg(dtrace_hdl_t *dtp, const char *errtag, const char *region,


rebase

rebase

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@53525 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/chromeos/cros/fake/fake_network_library.h
+++ chrome/browser/chromeos/cros/fake/fake_network_library.h
@@ -117,6 +117,7 @@
   virtual std::string GetHtmlInfo(int refresh) {
     return "";
   }
+  virtual void UpdateSystemInfo() {}

  private:
   std::string ip_address_;


ixgbe: remove redundant nm_config callback

--- LINUX/ixgbe_netmap_linux.h
+++ LINUX/ixgbe_netmap_linux.h
@@ -729,19 +729,6 @@
 	return ret;
 }

-static int
-ixgbe_netmap_config(struct netmap_adapter *na, struct nm_config_info *info)
-{
-	struct NM_IXGBE_ADAPTER *adapter = netdev_priv(na->ifp);
-
-	info->num_tx_rings = adapter->num_tx_queues;
-	info->num_rx_rings = adapter->num_rx_queues;
-	info->num_tx_descs = NM_IXGBE_TX_RING(adapter, 0)->count;
-	info->num_rx_descs = NM_IXGBE_RX_RING(adapter, 0)->count;
-
-	return 0;
-}
-
 static void ixgbe_netmap_detach(struct NM_IXGBE_ADAPTER *adapter);
 /*
  * The attach routine, called near the end of ixgbe_attach(),
@@ -780,7 +767,6 @@
 	na.nm_register = ixgbe_netmap_reg;
 	na.nm_krings_create = ixgbe_netmap_krings_create;
 	na.nm_krings_delete = ixgbe_netmap_krings_delete;
-	na.nm_config = ixgbe_netmap_config;
 	na.num_tx_rings = adapter->num_tx_queues;
 	na.num_rx_rings = adapter->num_rx_queues;
 	na.nm_intr = ixgbe_netmap_intr;


correction d'un commentaire

correction d'un commentaire

--- Projet/Version1/src/dict.c
+++ Projet/Version1/src/dict.c
@@ -137,7 +137,7 @@
 	noeud_frere = NULL;
 	int taille;

-	//On cherche premiere si le mot est present ou non
+	//On cherche premierement si le mot est present ou non
 	if (dict_rechercher_mot(dico, mot, taille_mot, &index, &taille) == DICT_NOTFOUND){
 		while (index_caractere_courant < taille_mot){
 			//On recherche successivement le caractere courant dans les niveaux de l'arbre


Update QNVersion.h

Update QNVersion.h

--- QiniuSDK/Utils/QNVersion.h
+++ QiniuSDK/Utils/QNVersion.h
@@ -11,4 +11,4 @@
 /**
  *    sdk 版本
  */
-static NSString *const kQiniuVersion = @"8.4.2";
+static NSString *const kQiniuVersion = @"8.4.3";


more tweaks to assertion not reached macros to avoid compiler warnings

--- Library/Sources/Stroika/Foundation/Debug/Assertions.h
+++ Library/Sources/Stroika/Foundation/Debug/Assertions.h
@@ -305,7 +305,7 @@
  *
  *  \hideinitializer
  */
-#define AssertNotReached() ([[maybe_unused]] (Stroika::Foundation::Debug::Private_::Assertion_Failure_Handler_ ("Assert", "Not Reached", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_), false))
+#define AssertNotReached() Stroika::Foundation::Debug::Private_::Assertion_Failure_Handler_ ("Assert", "Not Reached", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_)

 /**
  *  \def EnsureNotReached(p)
@@ -314,7 +314,7 @@
  *
  *  \hideinitializer
  */
-#define EnsureNotReached() ([[maybe_unused]] (Stroika::Foundation::Debug::Private_::Assertion_Failure_Handler_ ("Ensure", "Not Reached", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_), false))
+#define EnsureNotReached() Stroika::Foundation::Debug::Private_::Assertion_Failure_Handler_ ("Ensure", "Not Reached", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_)

 /**
  *  \def RequireNotReached(p)
@@ -323,7 +323,7 @@
  *
  *  \hideinitializer
  */
-#define RequireNotReached() ([[maybe_unused]] (Stroika::Foundation::Debug::Private_::Assertion_Failure_Handler_ ("Require", "Not Reached", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_), false))
+#define RequireNotReached() Stroika::Foundation::Debug::Private_::Assertion_Failure_Handler_ ("Require", "Not Reached", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_)

 /**
  *  \def RequireNotReached(p)
@@ -332,7 +332,7 @@
  *
  *  \hideinitializer
  */
-#define WeakAsserteNotReached() ([[maybe_unused]] (Stroika::Foundation::Debug::Private_::Weak_Assertion_Failure_Handler_ ("WeakAssert", "Not Reached", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_), false))
+#define WeakAsserteNotReached() Stroika::Foundation::Debug::Private_::Weak_Assertion_Failure_Handler_ ("WeakAssert", "Not Reached", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_)

 /**
  *  \def AssertNotImplemented()
@@ -342,7 +342,7 @@
  *
  *  \hideinitializer
  */
-#define AssertNotImplemented() ([[maybe_unused]] (Stroika::Foundation::Debug::Private_::Assertion_Failure_Handler_ ("Assert", "Not Implemented", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_), false))
+#define AssertNotImplemented() Stroika::Foundation::Debug::Private_::Assertion_Failure_Handler_ ("Assert", "Not Implemented", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_)

 /**
  *  \def AssertNotImplemented()
@@ -352,7 +352,7 @@
  *
  *  \hideinitializer
  */
-#define WeakAssertNotImplemented() ([[maybe_unused]] (Stroika::Foundation::Debug::Private_::Weak_Assertion_Failure_Handler_ ("WeakAssert", "Not Implemented", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_), false))
+#define WeakAssertNotImplemented() Stroika::Foundation::Debug::Private_::Weak_Assertion_Failure_Handler_ ("WeakAssert", "Not Implemented", __FILE__, __LINE__, ASSERT_PRIVATE_ENCLOSING_FUNCTION_NAME_)

 #else


tweak last checkin

tweak last checkin

--- Library/Sources/Stroika/Foundation/Execution/Common.h
+++ Library/Sources/Stroika/Foundation/Execution/Common.h
@@ -62,7 +62,8 @@
             template    <typename   MUTEX, typename ...ARGS>
             inline  std::unique_lock<MUTEX>   make_unique_lock (MUTEX& m, ARGS&& ...args)
             {
-                return std::unique_lock<MUTEX> (m, forward<ARGS> (args)...);
+                using   namespace   std;
+                return unique_lock<MUTEX> (m, forward<ARGS> (args)...);
             }


variadic template pass extra params to make_unique_lock

--- Library/Sources/Stroika/Foundation/Execution/Common.h
+++ Library/Sources/Stroika/Foundation/Execution/Common.h
@@ -7,7 +7,7 @@
 #include    "../StroikaPreComp.h"

 #include    <mutex>
-
+#include    <type_traits>

@@ -59,10 +59,10 @@
              *      static  SOME_MUTEXT_TYPE    sLock_;
              *      auto    critSec { Execution::make_unique_lock (sLock_) };
              */
-            template    <typename   MUTEX>
-            inline  std::unique_lock<MUTEX>   make_unique_lock (MUTEX& m)
+            template    <typename   MUTEX, typename ...ARGS>
+            inline  std::unique_lock<MUTEX>   make_unique_lock (MUTEX& m, ARGS&& ...args)
             {
-                return std::unique_lock<MUTEX> (m);
+                return std::unique_lock<MUTEX> (m, forward<ARGS> (args)...);
             }


Create showLongCitation.c

Create showLongCitation.c

error: pathspec 'Library/scripts/reference-citation/showLongCitation.c' did not match any file(s) known to git

--- Library/scripts/reference-citation/showLongCitation.c
+++ Library/scripts/reference-citation/showLongCitation.c
@@ -0,0 +1,7 @@
+reference(citation): showLongCitation
+New Window [ Name: "Citation Note" ]
+Go to Layout [ “longReferenceView” (reference) ]
+Pause/Resume Script [ Indeﬁnitely ]
+Close Window [ Current Window ]
+Exit Script [ ]
+January 7, 平成26 17:51:07 Imagination Quality Management.fp7 - showLongCitation -1-


apps/readline: check whether CONFIG_EOL_IS_EITHER_CRLF is defined

* We should check whether CONFIG_EOL_IS_EITHER_CRLF is defined,
  instead of checking it's value.

Signed-off-by: Oleg Lyovin <9e7fd33cf90c7e429276114f54b1f8488150523e@partner.samsung.com>

--- apps/system/readline/readline_common.c
+++ apps/system/readline/readline_common.c
@@ -247,7 +247,7 @@
 		else if (ch == '\n')
 #elif defined(CONFIG_EOL_IS_CR)
 		else if (ch == '\r')
-#elif CONFIG_EOL_IS_EITHER_CRLF
+#elif defined(CONFIG_EOL_IS_EITHER_CRLF)
 		else if (ch == '\n' || ch == '\r')
 #endif
 		{


ARM: ixp4xx: fix read{b,w,l} return types

On ixp4xx, the readl() function returns an 'unsigned long' output
when indirect I/O is used. This is unlike any other platform, and
it causes lots of harmless compiler warnings, such as:

drivers/ata/libahci.c: In function 'ahci_show_host_version':
drivers/ata/libahci.c:254:22: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
drivers/block/mtip32xx/mtip32xx.c: In function 'mtip_hw_read_registers':
drivers/block/mtip32xx/mtip32xx.c:2602:31: warning: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
drivers/block/cciss.c: In function 'print_cfg_table':
drivers/block/cciss.c:3845:25: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]

This changes all six of the ixp4xx specific I/O read functions
to return the same types that we have in the normal asm/io.h,
to avoid the warnings.

Signed-off-by: Arnd Bergmann <f2c659f01951776204a6c5b902787d9019fbeebd@arndb.de>
Acked-by: Krzysztof Halasa <522081e114fbe9546c6437b485853094bc43bdc3@piap.pl>

--- arch/arm/mach-ixp4xx/include/mach/io.h
+++ arch/arm/mach-ixp4xx/include/mach/io.h
@@ -143,7 +143,7 @@
 		writel(*vaddr++, bus_addr);
 }

-static inline unsigned char __indirect_readb(const volatile void __iomem *p)
+static inline u8 __indirect_readb(const volatile void __iomem *p)
 {
 	u32 addr = (u32)p;
 	u32 n, byte_enables, data;
@@ -166,7 +166,7 @@
 		*vaddr++ = readb(bus_addr);
 }

-static inline unsigned short __indirect_readw(const volatile void __iomem *p)
+static inline u16 __indirect_readw(const volatile void __iomem *p)
 {
 	u32 addr = (u32)p;
 	u32 n, byte_enables, data;
@@ -189,7 +189,7 @@
 		*vaddr++ = readw(bus_addr);
 }

-static inline unsigned long __indirect_readl(const volatile void __iomem *p)
+static inline u32 __indirect_readl(const volatile void __iomem *p)
 {
 	u32 addr = (__force u32)p;
 	u32 data;
@@ -350,7 +350,7 @@
 					((unsigned long)p <= (PIO_MASK + PIO_OFFSET)))

 #define	ioread8(p)			ioread8(p)
-static inline unsigned int ioread8(const void __iomem *addr)
+static inline u8 ioread8(const void __iomem *addr)
 {
 	unsigned long port = (unsigned long __force)addr;
 	if (__is_io_address(port))
@@ -378,7 +378,7 @@
 }

 #define	ioread16(p)			ioread16(p)
-static inline unsigned int ioread16(const void __iomem *addr)
+static inline u16 ioread16(const void __iomem *addr)
 {
 	unsigned long port = (unsigned long __force)addr;
 	if (__is_io_address(port))
@@ -407,7 +407,7 @@
 }

 #define	ioread32(p)			ioread32(p)
-static inline unsigned int ioread32(const void __iomem *addr)
+static inline u32 ioread32(const void __iomem *addr)
 {
 	unsigned long port = (unsigned long __force)addr;
 	if (__is_io_address(port))


powerpc: Don't use local named register variable in current_thread_info

LLVM doesn't support local named register variables and is unlikely
to. current_thread_info is using one, fix it by moving it out and
calling it __current_r1().

I gave it a bit of an obscure name because we don't want anyone else
using it - they should use current_stack_pointer(). This specific
case is performance critical and we can't afford to call a function
to get it. Furthermore it isn't important to know exactly where in
the stack we are since we mask the lower bits.

Signed-off-by: Anton Blanchard <14deb5e5e417133e888bf47bb6a3555c9bb7d81c@samba.org>
Signed-off-by: Michael Ellerman <864f124608374e06e4da1fa5d2e47ed839b95411@ellerman.id.au>

--- arch/powerpc/include/asm/thread_info.h
+++ arch/powerpc/include/asm/thread_info.h
@@ -71,13 +71,12 @@
 #define THREAD_SIZE_ORDER	(THREAD_SHIFT - PAGE_SHIFT)

 /* how to get the thread information struct from C */
+register unsigned long __current_r1 asm("r1");
 static inline struct thread_info *current_thread_info(void)
 {
-	register unsigned long sp asm("r1");
-
 	/* gcc4, at least, is smart enough to turn this into a single
 	 * rlwinm for ppc32 and clrrdi for ppc64 */
-	return (struct thread_info *)(sp & ~(THREAD_SIZE-1));
+	return (struct thread_info *)(__current_r1 & ~(THREAD_SIZE-1));
 }

 #endif /* __ASSEMBLY__ */


x86: fix nmi_watchdog=2 on Pentium-D CPUs

implement nmi_watchdog=2 on this class of CPUs:

  cpu family      : 15
  model           : 6
  model name      : Intel(R) Pentium(R) D CPU 3.00GHz

the watchdog's ->setup() method is safe anyway, so if the CPU
cannot support it we'll bail out safely.

Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>

--- arch/x86/kernel/cpu/perfctr-watchdog.c
+++ arch/x86/kernel/cpu/perfctr-watchdog.c
@@ -652,9 +652,6 @@
 			wd_ops = &p6_wd_ops;
 			break;
 		case 15:
-			if (boot_cpu_data.x86_model > 0x4)
-				return;
-
 			wd_ops = &p4_wd_ops;
 			break;
 		default:


STYLE: Use C++14 `make_reverse_iterator` inside `CoLexicographicCompare`

Simplified the implementation of `CoLexicographicCompare::operator()`.

--- Modules/Core/Common/include/itkLexicographicCompare.h
+++ Modules/Core/Common/include/itkLexicographicCompare.h
@@ -74,17 +74,12 @@
   bool
   operator()(const TBidirectionalRange1 & lhs, const TBidirectionalRange2 & rhs) const
   {
-    using ReverseIterator1 = std::reverse_iterator<decltype(std::begin(lhs))>;
-    using ReverseIterator2 = std::reverse_iterator<decltype(std::begin(rhs))>;
-
     // Note that the begin and end arguments are passed in reverse order, as
-    // each of them is converted to an std::reverse_iterator! (From C++14,
-    // std::make_reverse_iterator would be of help here, to construct the four
-    // std::reverse_iterator arguments!)
-    return std::lexicographical_compare(ReverseIterator1{ std::end(lhs) },
-                                        ReverseIterator1{ std::begin(lhs) },
-                                        ReverseIterator2{ std::end(rhs) },
-                                        ReverseIterator2{ std::begin(rhs) });
+    // each of them is converted to an std::reverse_iterator!
+    return std::lexicographical_compare(std::make_reverse_iterator(std::end(lhs)),
+                                        std::make_reverse_iterator(std::begin(lhs)),
+                                        std::make_reverse_iterator(std::end(rhs)),
+                                        std::make_reverse_iterator(std::begin(rhs)));
   }
 };


Update RenderTexture.h

Update RenderTexture.h

--- SOCEngine/SOCEngine/Rendering/Texture/RenderTexture.h
+++ SOCEngine/SOCEngine/Rendering/Texture/RenderTexture.h
@@ -15,15 +15,13 @@
 			void Initialize(Device::DirectX& dx, const Size<uint>& size, DXGI_FORMAT srvFormat, DXGI_FORMAT rtvFormat, DXGI_FORMAT uavFormat, uint optionalBindFlags, uint sampleCount = 0, uint mipLevel = 1);
 			void Initialize(Device::DirectX& dx, const DXResource<ID3D11RenderTargetView>& rtv, const Size<uint>& size);

-			void Destroy();
-
 			void Clear(Device::DirectX& dx, const Color& color);

 			GET_CONST_ACCESSOR(RenderTargetView, const DXResource<ID3D11RenderTargetView>&, _renderTargetView);

 		private:
 			DXResource<ID3D11RenderTargetView>	_renderTargetView;
-			Texture2D							_tex2D;
+			Texture2D				_tex2D;
 		};
 	}
-}+}


Implement high address bits buffer

Implement high address bits buffer

Switch Heartbeat LED to onboard amber LED
Turn on high address bits enable line as output
Manage high address bits enable line depending on bus address
Change "1k" command to "low128" command

--- alice3/io_board/minim4/ioboard.c
+++ alice3/io_board/minim4/ioboard.c
@@ -33,18 +33,15 @@
     gpio->MODER = (gpio->MODER & mask) | value;
 }

-#define PANIC_LED_PIN_MASK GPIO_PIN_13
-#define PANIC_LED_PORT GPIOC
-
-#define INFO_LED_PIN_MASK GPIO_PIN_12
+#define INFO_LED_PIN_MASK GPIO_PIN_13
 #define INFO_LED_PORT GPIOC

-#define HEARTBEAT_LED_PIN_MASK GPIO_PIN_15
-#define HEARTBEAT_LED_PORT GPIOA
+#define HEARTBEAT_LED_PIN_MASK GPIO_PIN_12
+#define HEARTBEAT_LED_PORT GPIOC

 void LED_set_panic(int on)
 {
-    HAL_GPIO_WritePin(PANIC_LED_PORT, PANIC_LED_PIN_MASK, on);
+    HAL_GPIO_WritePin(INFO_LED_PORT, INFO_LED_PIN_MASK, on);
 }

 void LED_beat_heart()
@@ -84,12 +81,6 @@
     HAL_GPIO_Init(HEARTBEAT_LED_PORT, &GPIO_InitStruct);

     HAL_GPIO_WritePin(HEARTBEAT_LED_PORT, HEARTBEAT_LED_PIN_MASK, 1);
-
-    GPIO_InitStruct.Pin = PANIC_LED_PIN_MASK;
-    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-    GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
-    HAL_GPIO_Init(PANIC_LED_PORT, &GPIO_InitStruct);

     GPIO_InitStruct.Pin = INFO_LED_PIN_MASK;
     GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
@@ -942,6 +933,15 @@
 };
 int address_line_count = sizeof(address_lines) / sizeof(address_lines[0]);

+// Because B5 fans out to A10..A15 (currently through an inverter) we define
+// a mask here for all those pins and check it below when setting an address
+#define BUS_ADDRESS_MASK 0xfa00 // 1111 1100 0000 0000
+
+#define BUS_HIGHBITS_BUFFER_PIN_MASK GPIO_PIN_15
+#define BUS_HIGHBITS_BUFFER_PORT GPIOA
+#define BUS_HIGHBITS_BUFFER_ENABLE 0
+#define BUS_HIGHBITS_BUFFER_DISABLE 1
+
 #define BUS_IO_MASK (BUS_IORQ_PIN_MASK | BUS_RD_PIN_MASK | BUS_WR_PIN_MASK | BUS_A7_PIN_MASK)

 #define IO_BOARD_ADDR   0
@@ -1030,6 +1030,7 @@
         GPIOLine* line = &address_lines[i];
         set_GPIO_iotype(line->gpio, line->pin, GPIO_MODE_OUTPUT_PP);
     }
+    set_GPIO_value(BUS_HIGHBITS_BUFFER_PORT, BUS_HIGHBITS_BUFFER_PIN_MASK, BUS_HIGHBITS_BUFFER_ENABLE);
 }

 void BUS_set_ADDRESS_as_input()
@@ -1038,14 +1039,28 @@
         GPIOLine* line = &address_lines[i];
         set_GPIO_iotype(line->gpio, line->pin, GPIO_MODE_INPUT);
     }
-}
-
-void BUS_set_ADDRESS(unsigned int a)
-{
-    for(int i = 0; i < address_line_count; i++) {
+    set_GPIO_value(BUS_HIGHBITS_BUFFER_PORT, BUS_HIGHBITS_BUFFER_PIN_MASK, BUS_HIGHBITS_BUFFER_DISABLE);
+}
+
+int BUS_set_ADDRESS(unsigned int a)
+{
+    // Special case high address_lines because one fans out to A10..A15
+    if((a > (0xffff & ~BUS_ADDRESS_MASK)) & (a < BUS_ADDRESS_MASK))
+        return 0;
+
+    for(int i = 0; i < address_line_count - 1; i++) {
         GPIOLine* line = &address_lines[i];
         set_GPIO_value(line->gpio, 0x1U << line->pin, (a >> i) & 0x01);
     }
+
+    // Special case for address_lines[address_line_count - 1] because
+    // that one fans out to A10..A15
+    int lines_A10_A15 = (a >= BUS_ADDRESS_MASK);
+
+    GPIOLine* line = &address_lines[address_line_count - 1];
+    set_GPIO_value(line->gpio, 0x1U << line->pin, lines_A10_A15);
+
+    return 1;
 }

 // Caller has to guarantee A and D access will not collide with
@@ -1130,6 +1145,7 @@

 void BUS_mastering_start()
 {
+    BUS_set_ADDRESS(0);
     BUS_set_ADDRESS_as_output();

     HAL_NVIC_DisableIRQ(EXTI1_IRQn); // Stop /RD from interrupting
@@ -1209,6 +1225,13 @@
         HAL_GPIO_Init(line->gpio, &GPIO_InitStruct);
     }

+    // High address pin enable, always enabled, controls buffer /OE
+    GPIO_InitStruct.Pin = BUS_HIGHBITS_BUFFER_PIN_MASK;
+    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+    GPIO_InitStruct.Pull = GPIO_NOPULL;
+    HAL_GPIO_Init(BUS_HIGHBITS_BUFFER_PORT, &GPIO_InitStruct);
+    set_GPIO_value(BUS_HIGHBITS_BUFFER_PORT, BUS_HIGHBITS_BUFFER_PIN_MASK, BUS_HIGHBITS_BUFFER_DISABLE);
+
     BUS_reset_init();
 }

@@ -1231,6 +1254,7 @@
 void BUS_write_IO(int io, unsigned char byte)
 {
     BUS_mastering_start();
+    BUS_set_DATA(0);
     BUS_set_DATA_as_output();

     BUS_write_io_byte(io, byte);
@@ -1252,6 +1276,8 @@
 void BUS_write_ROM_image()
 {
     BUS_mastering_start();
+    BUS_set_ADDRESS(0);
+    BUS_set_DATA(0);
     BUS_set_DATA_as_output();

     for(unsigned int a = 0; a < romimage_length; a++)
@@ -1288,6 +1314,7 @@
 void VIDEO_start_clock()
 {
     BUS_mastering_start();
+    BUS_set_DATA(0);
     BUS_set_DATA_as_output();

     BUS_write_io_byte(VIDEO_BOARD_OUTPUT_ADDR, VIDEO_BOARD_START_CLOCK);
@@ -1912,6 +1939,7 @@
     printf("pass       - pass monitor keys to Z80\n");
     printf("version    - print firmware build version\n");
     printf("read N     - read and dump block N\n");
+    printf("low128     - dump low 128 bytes from RAM (resetting Z80!!)\n");
     printf("panic      - force panic\n");
     printf("flashinfo  - force flashing the info LED\n");
 }
@@ -1962,12 +1990,12 @@
             printf("panicking now\n");
             panic();

-        } else if(strcmp(gMonitorCommandLine, "1k") == 0) {
+        } else if(strcmp(gMonitorCommandLine, "low128") == 0) {

             BUS_reset_start();
-            static unsigned char buf[1024];
-            BUS_read_memory_block(0, 1024, buf);
-            printf("RAM at 1K:\n");
+            static unsigned char buf[128];
+            BUS_read_memory_block(0, 128, buf);
+            printf("low 128 bytes of RAM:\n");
             dump_buffer_hex(4, buf, sizeof(buf));
             BUS_reset_finish();


Correct to get the input value by AsciiStringToUint64 API. The input parameter must be pointer to UINT64.

git-svn-id: f3880c1fc5096ce2109c8aec392d8e07f619f417@1603 c2973edb-eda0-4c78-bc6a-9341b269661f

--- Source/C/GenPage/GenPage.c
+++ Source/C/GenPage/GenPage.c
@@ -39,8 +39,8 @@
 #define EFI_PAGE_BASE_OFFSET_IN_LDR 0x70000
 #define EFI_PAGE_BASE_ADDRESS       (EFI_PAGE_BASE_OFFSET_IN_LDR + 0x20000)

-unsigned int gPageTableBaseAddress  = EFI_PAGE_BASE_ADDRESS;
-unsigned int gPageTableOffsetInFile = EFI_PAGE_BASE_OFFSET_IN_LDR;
+UINT32 gPageTableBaseAddress  = EFI_PAGE_BASE_ADDRESS;
+UINT32 gPageTableOffsetInFile = EFI_PAGE_BASE_OFFSET_IN_LDR;

 #define EFI_MAX_ENTRY_NUM     512

@@ -234,15 +234,13 @@
   //
   PageFile = fopen (PageFileName, "w+b");
   if (PageFile == NULL) {
-    //fprintf (stderr, "GenBinPage: Could not open file %s\n", PageFileName);
-    Error (PageFileName, 0, 1, "File open failure", NULL);
+    Error (NoPageFileName, 0, 0x4002, "Invalid parameter option", "Output File %s open failure", PageFileName);
     return -1;
   }

   NoPageFile = fopen (NoPageFileName, "r+b");
   if (NoPageFile == NULL) {
-    //fprintf (stderr, "GenBinPage: Could not open file %s\n", NoPageFileName);
-    Error (NoPageFileName, 0, 1, "File open failure", NULL);
+    Error (NoPageFileName, 0, 0x4002, "Invalid parameter option", "Input File %s open failure", NoPageFileName);
     fclose (PageFile);
     return -1;
   }
@@ -254,8 +252,7 @@
   FileSize = ftell (NoPageFile);
   fseek (NoPageFile, 0, SEEK_SET);
   if (FileSize > gPageTableOffsetInFile) {
-    //fprintf (stderr, "GenBinPage: file size too large - 0x%x\n", FileSize);
-    Error (NoPageFileName, 0, 0x4002, "file size too large", NULL);
+    Error (NoPageFileName, 0, 0x4002, "Invalid parameter option", "Input file size (0x%x) exceeds the Page Table Offset (0x%x)", FileSize, gPageTableOffsetInFile);
     fclose (PageFile);
     fclose (NoPageFile);
     return -1;
@@ -294,7 +291,7 @@
   CHAR8       *OutputFile = NULL;
   CHAR8       *InputFile = NULL;
   EFI_STATUS  Status;
-  UINT64      LogLevel;
+  UINT64      TempValue;

   SetUtilityName("GenPage");

@@ -315,7 +312,7 @@
     Version();
     return 0;
   }
-
+
   while (argc > 0) {
     if ((stricmp (argv[0], "-o") == 0) || (stricmp (argv[0], "--output") == 0)) {
       if (argv[1] == NULL || argv[1][0] == '-') {
@@ -333,11 +330,12 @@
         Error (NULL, 0, 1003, "Invalid option value", "Base address is missing for -b option");
         return STATUS_ERROR;
       }
-      Status = AsciiStringToUint64 (argv[1], FALSE, &gPageTableBaseAddress);
+      Status = AsciiStringToUint64 (argv[1], FALSE, &TempValue);
       if (EFI_ERROR (Status)) {
         Error (NULL, 0, 1003, "Invalid option value", "Base address is not valid intergrator");
         return STATUS_ERROR;
       }
+      gPageTableBaseAddress = (UINT32) TempValue;
       argc -= 2;
       argv += 2;
       continue;
@@ -348,11 +346,12 @@
         Error (NULL, 0, 1003, "Invalid option value", "Offset is missing for -f option");
         return STATUS_ERROR;
       }
-      Status = AsciiStringToUint64 (argv[1], FALSE, &gPageTableOffsetInFile);
+      Status = AsciiStringToUint64 (argv[1], FALSE, &TempValue);
       if (EFI_ERROR (Status)) {
         Error (NULL, 0, 1003, "Invalid option value", "Offset is not valid intergrator");
         return STATUS_ERROR;
       }
+      gPageTableOffsetInFile = (UINT32) TempValue;
       argc -= 2;
       argv += 2;
       continue;
@@ -375,13 +374,13 @@
         Error (NULL, 0, 1003, "Invalid option value", "Debug Level is not specified.");
         return STATUS_ERROR;
       }
-      Status = AsciiStringToUint64 (argv[1], FALSE, &LogLevel);
+      Status = AsciiStringToUint64 (argv[1], FALSE, &TempValue);
       if (EFI_ERROR (Status)) {
         Error (NULL, 0, 1003, "Invalid option value", "Debug Level is not valid intergrator.");
         return STATUS_ERROR;
       }
-      if (LogLevel > 9) {
-        Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0-9, currnt input level is %d", LogLevel);
+      if (TempValue > 9) {
+        Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0-9, currnt input level is %d", TempValue);
         return STATUS_ERROR;
       }
       argc -= 2;


Revert to 5.0 size computation in accurate elements, may fix #1821

--- bacula/src/filed/accurate.c
+++ bacula/src/filed/accurate.c
@@ -215,7 +215,7 @@
    /* we store CurFile, fname and ctime/mtime in the same chunk
     * we need one extra byte to handle an empty chksum
     */
-   item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+1);
+   item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+3);
    item->seen = 0;

    /* TODO: see if we can optimize this part with memcpy instead of strcpy */


baseboard/kukui: Free up additional flash space

BRANCH=none
BUG=b:172020503, b:256193799
TEST=make buildall

Signed-off-by: Tom Hughes <fc5c12f30a5ed2baa0581f44ee14ad1eb7b20d83@chromium.org>
Change-Id: I746815d69bbdab3dd95ba69f47d4c1f7494fe642
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4024040
Reviewed-by: Eric Yilun Lin <2f2733c7206ea2b76bd2db1905cc5e8a75841c48@google.com>
Code-Coverage: Zoss <345cf107e82c70959d46f59d98bddc98ce458aff@prod.google.com>

--- baseboard/kukui/baseboard.h
+++ baseboard/kukui/baseboard.h
@@ -286,6 +286,7 @@
 #define CONFIG_USB_PD_VBUS_DETECT_TCPC

 /* Modules we want to exclude */
+#undef CONFIG_ACCEL_SPOOF_MODE
 #undef CONFIG_CMD_ACCELSPOOF
 #undef CONFIG_CMD_BATTFAKE
 #undef CONFIG_CMD_FLASH
@@ -310,14 +311,19 @@
 #undef CONFIG_CMD_CRASH
 #undef CONFIG_CMD_HCDEBUG
 #undef CONFIG_CMD_IDLE_STATS
+#undef CONFIG_CMD_KEYBOARD
 #undef CONFIG_CMD_MFALLOW
 #undef CONFIG_CMD_MMAPINFO
+#undef CONFIG_CMD_PD
+#undef CONFIG_CMD_POWER_AP
 #undef CONFIG_CMD_PWR_AVG
 #undef CONFIG_CMD_REGULATOR
 #undef CONFIG_CMD_RW
 #undef CONFIG_CMD_SLEEPMASK
 #undef CONFIG_CMD_SLEEPMASK_SET
+#undef CONFIG_CMD_SYSINFO
 #undef CONFIG_CMD_TYPEC
+#undef CONFIG_CMD_WAITMS
 #undef CONFIG_HOSTCMD_FLASHPD
 #undef CONFIG_HOSTCMD_RWHASHPD


This looks better than a 4GB malloc.  =-)

--- benchmark/blobslap_client.c
+++ benchmark/blobslap_client.c
@@ -34,7 +34,7 @@
 {
   char c;
   char *host= NULL;
-  char *blob= (char *)malloc(UINT32_MAX);
+  char *blob= NULL;
   char *function_name= NULL;
   unsigned short port= 0;
   gearman_return_t ret;
@@ -98,6 +98,8 @@
   }

   task = (gearman_task_st **)malloc(num_tasks * sizeof(gearman_task_st));
+  blob = (char *)malloc(max);
+  memset(blob, 'x', max);

   /* This creates the client data and starts our connection to
      the job server. */
@@ -128,9 +130,6 @@
       {
         /* Choose a random size between min and max. */
         blob_size = (min + rand()) % (max + 1);
-
-        /* The blob will be the same char over and over for speed. */
-        memset(blob, 'x', blob_size);
       }
       else if (!(blob_done))
       {
@@ -159,9 +158,6 @@
       {
         /* Choose a random size between min and max. */
         blob_size = (min + rand()) % (max + 1);
-
-        /* The blob will be the same char over and over for speed. */
-        memset(blob, 'x', blob_size);
       }
       else if (!(blob_done))
       {


small correction

small correction

--- Sources/eobj/eobj_handle.c
+++ Sources/eobj/eobj_handle.c
@@ -34,8 +34,7 @@
  */
 t_pt eobj_get_mouse_global_position(void* x)
 {
-    t_pt point = erouter_getmouse_global_position();
-    return point;
+    return erouter_getmouse_global_position();
 }

 //! Retrieve the canvas mouse position


Delete skiplist.h

Delete skiplist.h

--- Step1/skip_list/skiplist.h
+++ Step1/skip_list/skiplist.h
@@ -1,124 +0,0 @@
-#include <bits/stdc++.h>
-using namespace std;
-#define MAX_HIEGHT 32
-#define ONEIN 2
-
-int getRandom(){
-     return rand() % ONEIN;
-}
-
-struct node{
-    int height;
-    long long nodeId;
-    node **next;
-};
-
-struct skipList{
-    int height;
-    long long size;
-    node **next;
-};
-
-node *getNewNode(int height){
-    node * newnode = new node;
-    newnode->height = height;
-    newnode->nodeId = 0;
-    newnode->next = new node*[height];
-    return newnode;
-}
-
-skipList *getNewSkipList(){
-    skipList * newSkipList = new skipList;
-    newSkipList->height = 0;
-    newSkipList->next = new node*[MAX_HIEGHT];
-    for(int i=0; i<MAX_HIEGHT; i++) newSkipList->next[i] = NULL;
-    newSkipList->size = 0;
-    return newSkipList;
-}
-
-void addNode(skipList *s, long long newNodeId){
-    int level = 0;
-	for(;getRandom() == 1 ; level++) {
-        if(level+1 > s->height || level==MAX_HIEGHT-1) {
-            s->height = level+1;
-            break;
-        }
-	}
-	node *prev = getNewNode(0);
-    node *current = getNewNode(0);
-    node *newNode = getNewNode(level);
-    prev = NULL;
-    newNode->nodeId = newNodeId;
-    current = NULL;
-    for(int i = s->height-1; i >= 0; i-- ){
-        if(!current){
-            current = s->next[i];
-        }
-        for(;current; current = current->next[i]){
-			if(current->nodeId > newNodeId){
-				break;
-			}
-			prev = current;
-            if(!current->next[i]) break;
-		}
-		if( i > level ){
-			continue;
-		}
-		if(current->nodeId > newNodeId) newNode->next[i] = current;
-		else newNode->next[i] = NULL;
-		if(prev){
-            prev->next[i] = newNode;
-            if(prev->nodeId != current->nodeId) current = prev;
-		}
-		else s->next[i] = newNode;
-	}
-    s->size++;
-}
-
-int findInSkipList(node *curr, int *lvl, long long nodeid){
-    node *prev = curr;
-    while(curr->next[*lvl] && curr->nodeId < nodeid){
-        curr = curr->next[*lvl];
-        prev = curr;
-    }
-    if(curr->nodeId == nodeid){
-        *lvl = curr->height;
-        return 1;
-    }else{
-        if(curr->nodeId > nodeid && *lvl>0){
-            *lvl = max(*lvl - 1, 0);
-            curr = prev;
-            return findInSkipList(curr, lvl, nodeid);
-        }
-        *lvl = max(*lvl - 1, 0);
-        return 0;
-    }
-}
-
-long long getCommonNodesCount(skipList *s1, skipList *s2){
-    long long count = 0;
-    if(s1->size > s2->size) swap(s1, s2);
-    int lvl = s2->height-1;
-    node *tempNode = getNewNode(0);
-    node *currNode = getNewNode(0);
-    currNode = s2->next[lvl-1];
-    tempNode = s1->next[0];
-    while(tempNode && lvl>=0){
-        if(findInSkipList(currNode, &lvl, tempNode->nodeId)){
-            count++;
-        }
-        tempNode = tempNode->next[0];
-    }
-    return count;
-}
-
-void deleteLL(skipList *s){
-    node *ll1node = s->next[0];
-    node *ll2node = s->next[0];
-    delete s;
-    while(ll1node){
-        ll2node = ll1node->next[0];
-        delete ll1node;
-        ll1node = ll2node;
-    }
-}


Removed unused forward declarations in System.h; forwardly declared Polar

--- Sub-Terra/include/System.h
+++ Sub-Terra/include/System.h
@@ -1,7 +1,6 @@
 #pragma once

-class JobManager;
-class EventManager;
+class Polar;

 class System {
 	friend class Polar;


adc file io syntax fixes [dev wip]

adc file io syntax fixes [dev wip]

--- TRAPSat_cFS/cfs/apps/ads1115/fsw/src/ads1115_device.c
+++ TRAPSat_cFS/cfs/apps/ads1115/fsw/src/ads1115_device.c
@@ -252,7 +252,7 @@
     ** from start of channel data (&ADS1115_ChannelData.adc_ch_1)
     ** continuing 8 bytes (2 bytes per channel, 4 channels)
     */
-    if ( (os_ret_val = OS_write(os_fd, &ADS1115_ChannelData.adc_ch_1, 8) < 0 )
+    if ( (os_ret_val = OS_write(os_fd, &ADS1115_ChannelData.adc_ch_1, 8)) < 0 )
     {
         OS_printf("OS_TranslatePath Status: %d \n", os_ret_val);
         return -1;


Remove this http_Teardown() entirely, it doesn't belong here.

--- bin/varnishd/http2/cache_http2_hpack.c
+++ bin/varnishd/http2/cache_http2_hpack.c
@@ -308,7 +308,6 @@
 			d->out = d->reset;
 			d->out_l = hp->ws->r - d->out;
 			d->out_u = 0;
-			http_Teardown(hp);
 			assert(d->out_u < d->out_l);
 		} else if (d->error)
 			break;


Add specializations of the 'IsUniLower' and 'IsUniUpper' type traits for the 'SMatTransExpr' expression class


Enable vectorized integral complex numbers in the 'IsVectorizable' type trait

--- blaze/util/typetraits/IsVectorizable.h
+++ blaze/util/typetraits/IsVectorizable.h
@@ -41,14 +41,13 @@
 //*************************************************************************************************

 #include <blaze/system/Vectorization.h>
-#include <blaze/util/Complex.h>
 #include <blaze/util/FalseType.h>
 #include <blaze/util/SelectType.h>
 #include <blaze/util/TrueType.h>
+#include <blaze/util/typetraits/IsComplex.h>
 #include <blaze/util/typetraits/IsDouble.h>
 #include <blaze/util/typetraits/IsFloat.h>
 #include <blaze/util/typetraits/IsIntegral.h>
-#include <blaze/util/typetraits/IsSame.h>

 namespace blaze {
@@ -67,13 +66,29 @@
 template< typename T >
 struct IsVectorizableHelper
 {
+ private:
+   //**struct Builtin******************************************************************************
+   template< typename BT >
+   struct Builtin { typedef BT  Type; };
    //**********************************************************************************************
-   enum { value = ( BLAZE_SSE_MODE  && ( IsFloat<T>::value  || IsSame<complex<float>,T>::value  ) ) ||
-                  ( BLAZE_SSE2_MODE && ( IsDouble<T>::value || IsSame<complex<double>,T>::value ) ) ||
-                  ( BLAZE_SSE2_MODE && ( IsIntegral<T>::value ) ) ||
-                  ( BLAZE_MIC_MODE  && ( IsFloat<T>::value  || IsSame<complex<float>,T>::value  ) ) ||
-                  ( BLAZE_MIC_MODE  && ( IsDouble<T>::value || IsSame<complex<double>,T>::value ) ) ||
-                  ( BLAZE_MIC_MODE  && ( IsIntegral<T>::value && sizeof(T) >= 4UL ) ) };
+
+   //**struct Complex******************************************************************************
+   template< typename CT >
+   struct Complex { typedef typename CT::value_type  Type; };
+   //**********************************************************************************************
+
+   //**********************************************************************************************
+   typedef typename SelectType< IsComplex<T>::value, Complex<T>, Builtin<T> >::Type::Type  T2;
+   //**********************************************************************************************
+
+ public:
+   //**********************************************************************************************
+   enum { value = ( BLAZE_SSE_MODE  && ( IsFloat<T2>::value    ) ) ||
+                  ( BLAZE_SSE2_MODE && ( IsDouble<T2>::value   ) ) ||
+                  ( BLAZE_SSE2_MODE && ( IsIntegral<T2>::value ) ) ||
+                  ( BLAZE_MIC_MODE  && ( IsFloat<T2>::value    ) ) ||
+                  ( BLAZE_MIC_MODE  && ( IsDouble<T2>::value   ) ) ||
+                  ( BLAZE_MIC_MODE  && ( IsIntegral<T2>::value && sizeof(T2) >= 4UL ) ) };
    typedef typename SelectType<value,TrueType,FalseType>::Type  Type;
    //**********************************************************************************************
 };
@@ -88,11 +103,11 @@
 // Depending on the available instruction set (SSE, SSE2, SSE3, SSE4, AVX, AVX2, MIC, ...),
 // this type trait tests whether or not the given template parameter is a vectorizable type,
 // i.e. a type for which intrinsic vector operations and optimizations can be used. Currently,
-// only signed/unsigned short, signed/unsigned int, signed/unsigned long, float, double,
-// complex<float>, and complex<double> are considered to be vectorizable types. In case the
-// type is vectorizable, the \a value member enumeration is set to 1, the nested type definition
-// \a Type is \a TrueType, and the class derives from \a TrueType. Otherwise \a value is set to
-// 0, \a Type is \a FalseType, and the class derives from \a FalseType.
+// only signed/unsigned short, signed/unsigned int, signed/unsigned long, float, double, and
+// the according complex numbers are considered to be vectorizable types. In case the type is
+// vectorizable, the \a value member enumeration is set to 1, the nested type definition \a Type
+// is \a TrueType, and the class derives from \a TrueType. Otherwise \a value is set to 0,
+// \a Type is \a FalseType, and the class derives from \a FalseType.

    \code
    blaze::IsVectorizable< int >::value         // Evaluates to 1


Added read only access to current playing animation

--- VFrame/VAnimationManager.h
+++ VFrame/VAnimationManager.h
@@ -39,6 +39,11 @@
 		{
 			animationList.insert(std::pair<sf::String, VAnimation*>(name, new VAnimation(Frames, FramesPerSecond, Looping, Reverse)));
 		}
+	}
+
+	sf::String CurrentAnimationName()
+	{
+		return currentAnim;
 	}

 	void Play(sf::String name)


players

players

--- VM/srcs/files_to_strings.c
+++ VM/srcs/files_to_strings.c
@@ -26,7 +26,6 @@
 		if (ret != 0)
 			e->player[i].len += ret;
 	}
-	ft_printf("Len: %d and champ: %d\n", e->player[i].len, CHAMP_MAX_SIZE);
 	if (e->player[i].len > TOTAL_SIZE)
 		ft_exit(e, 6);
 	if (close(fd) == -1)
@@ -46,8 +45,8 @@
 	while (i < e->player_amount)
 	{
 		if (ft_strlen(e->files[e->player[i].file_pos]) <= 4 ||
-				strcmp(e->files[e->player[i].file_pos] +
-						ft_strlen(e->files[e->player[i].file_pos]) - 4,".cor"))
+				ft_strcmp(e->files[e->player[i].file_pos] +
+						ft_strlen(e->files[e->player[i].file_pos]) - 4, ".cor"))
 			ft_exit(e, 11);
 		len = ft_string_len(e, i);
 		if ((fd = open(e->files[e->player[i].file_pos], O_RDONLY)) == -1)


Fix compilation warnings

Fix compilation warnings

git-svn-id: 2c9807fa3ff65b17195bd55dc8a6c4261e10127b@3854 d4fa192b-c00b-0410-8231-f00ffab90ce4

--- bin/varnishadm/varnishadm.c
+++ bin/varnishadm/varnishadm.c
@@ -93,8 +93,6 @@
 	int sock;
 	long status, bytes;
 	char *answer = NULL;
-	char buf[13];
-	char *p, *pp;

 	XXXAZ(VSS_parse(T_arg, &addr, &port));
 	XXXAN(n = VSS_resolve(addr, port, &ta));
@@ -116,7 +114,7 @@
 	write(sock, "ping\n", 5);
 	parse_reply(sock, &status, &bytes, &answer);
 	if (status != 200) {
-			fprintf(stderr, "No pong received from server\n", status);
+			fprintf(stderr, "No pong received from server\n");
 			exit(1);
 	}

@@ -126,7 +124,7 @@
 		free(answer);
 		parse_reply(sock, &status, &bytes, &answer);
 		if (status != 200 || strstr(answer, "PONG") == NULL) {
-			fprintf(stderr, "No pong received from server\n", status);
+			fprintf(stderr, "No pong received from server\n");
 			exit(1);
 		}
 	}


If HSH_Lookup() returns non-NULL, assert that sp->objhead != NULL.
HSH_Lookup() is supposed to guarantee this, but it appears that it
sometimes doesn't (perhaps a bug snuck in with grace mode?)

git-svn-id: 2c9807fa3ff65b17195bd55dc8a6c4261e10127b@2516 d4fa192b-c00b-0410-8231-f00ffab90ce4

--- bin/varnishd/cache_center.c
+++ bin/varnishd/cache_center.c
@@ -547,6 +547,7 @@
 		 * We hit a busy object, disembark worker thread and expect
 		 * hash code to restart us, still in STP_LOOKUP, later.
 		 */
+		spassert(sp->objhead != NULL);
 		WSP(sp, SLT_Debug, "on waiting list <%s>", sp->objhead->hash);
 		/*
 		 * There is a non-zero risk that we come here more than once


Add additional compile time constraints to the vectorized 'assign' functions of the 'DenseRow' class template

--- blaze/math/views/DenseRow.h
+++ blaze/math/views/DenseRow.h
@@ -44,6 +44,7 @@
 #include <blaze/math/constraints/Computation.h>
 #include <blaze/math/constraints/DenseMatrix.h>
 #include <blaze/math/constraints/DenseVector.h>
+#include <blaze/math/constraints/Padded.h>
 #include <blaze/math/constraints/RequiresEvaluation.h>
 #include <blaze/math/constraints/StorageOrder.h>
 #include <blaze/math/constraints/Symmetric.h>
@@ -1614,6 +1615,7 @@
    DenseRow<MT,SO,SF>::assign( const DenseVector<VT,true>& rhs )
 {
    BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE( ElementType );
+   BLAZE_CONSTRAINT_MUST_BE_PADDED_TYPE( VT );

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

@@ -1720,6 +1722,7 @@
    DenseRow<MT,SO,SF>::addAssign( const DenseVector<VT,true>& rhs )
 {
    BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE( ElementType );
+   BLAZE_CONSTRAINT_MUST_BE_PADDED_TYPE( VT );

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

@@ -1817,6 +1820,7 @@
    DenseRow<MT,SO,SF>::subAssign( const DenseVector<VT,true>& rhs )
 {
    BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE( ElementType );
+   BLAZE_CONSTRAINT_MUST_BE_PADDED_TYPE( VT );

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

@@ -1914,6 +1918,7 @@
    DenseRow<MT,SO,SF>::multAssign( const DenseVector<VT,true>& rhs )
 {
    BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE( ElementType );
+   BLAZE_CONSTRAINT_MUST_BE_PADDED_TYPE( VT );

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

@@ -4815,6 +4820,7 @@
    DenseRow<MT,false,true>::assign( const DenseVector<VT,true>& rhs )
 {
    BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE( ElementType );
+   BLAZE_CONSTRAINT_MUST_BE_PADDED_TYPE( VT );

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

@@ -4921,6 +4927,7 @@
    DenseRow<MT,false,true>::addAssign( const DenseVector<VT,true>& rhs )
 {
    BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE( ElementType );
+   BLAZE_CONSTRAINT_MUST_BE_PADDED_TYPE( VT );

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

@@ -5018,6 +5025,7 @@
    DenseRow<MT,false,true>::subAssign( const DenseVector<VT,true>& rhs )
 {
    BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE( ElementType );
+   BLAZE_CONSTRAINT_MUST_BE_PADDED_TYPE( VT );

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

@@ -5115,6 +5123,7 @@
    DenseRow<MT,false,true>::multAssign( const DenseVector<VT,true>& rhs )
 {
    BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE( ElementType );
+   BLAZE_CONSTRAINT_MUST_BE_PADDED_TYPE( VT );

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );


Minor fix in dssi4s memory allocation

Minor fix in dssi4s memory allocation

--- Opcodes/dssi4cs/src/load.c
+++ Opcodes/dssi4cs/src/load.c
@@ -47,7 +47,7 @@
       pcDSSIPath = getenv("DSSI_PATH");
       if (pcDSSIPath) {
         int len = strlen(pcLADSPAPath)+strlen(pcDSSIPath)+2;
-        char *tmp;
+        char *tmp = (char*)malloc(len);
         snprintf(tmp, len, "%s:%s", pcLADSPAPath, pcDSSIPath);
         pcLADSPAPath = tmp;
       }


Fix typo.

Fix typo.

--- OpenSim/Common/Exception.h
+++ OpenSim/Common/Exception.h
@@ -188,7 +188,7 @@
             : Exception{file, line, func, fmt::format(fmt, args...)} {}

     /** The message created by this constructor will contain the class name and
-    instance name of the provided Object, and also accepts a message formattted
+    instance name of the provided Object, and also accepts a message formatted
     using fmt::format() syntax. Use this when throwing an Exception directly.
     Use OPENSIM_THROW_FRMOBJ and OPENSIM_THROW_IF_FRMOBJ macros at throw sites.
     */


More requirements for the bounds

More requirements for the bounds

--- Projects/Proj1_REV2/main.c
+++ Projects/Proj1_REV2/main.c
@@ -94,11 +94,11 @@
 	else if (rxByte == 'Y' || rxByte == 'y'){
 		USART_Write(USART2, (uint8_t *)"Changing Bounds\r\n\r\n", 21);
 		USART_Write(USART2, (uint8_t *)"Enter New Lower Bound: \r\n\r\n", 29);
-		//take input/wait for enter and store in var
+		//take input/wait for enter and store in var - 50-9950 micro
 		//defaultLow =
 		USART_Write(USART2, (uint8_t *)"Enter New Upper Bound: \r\n\r\n", 29);
 		//take input/wait for enter and store in var
-		//ENSURE that this is at least 100 more than lower set
+		//ENSURE that this is at least 100 micro more than lower set
 		//defaultHigh =
 	}
 	else {


the RKCardView delegate can now be wired up in IB

--- RKCard/RKCard/RKCardView.h
+++ RKCard/RKCard/RKCardView.h
@@ -41,7 +41,7 @@

 @interface RKCardView : UIView

-@property (nonatomic)id<RKCardViewDelegate> delegate;
+@property (nonatomic, weak) IBOutlet id<RKCardViewDelegate> delegate;
 @property (nonatomic)UIImageView *profileImageView;
 @property (nonatomic)UIImageView *coverImageView;
 @property (nonatomic)UILabel *titleLabel;


Test re #7

Test re #7

--- SOCEngine/Collision/Test.h
+++ SOCEngine/Collision/Test.h
@@ -1,20 +0,0 @@
-#pragma once
-
-#include "EngineMath.h"
-
-namespace Collision
-{
-	class Ray
-	{
-	public:
-		Math::Vector3 origin;
-		Math::Vector3 direction;
-
-	public:
-		Ray(const Math::Vector3& origin, const Math::Vector3& direction);
-		~Ray(void);
-
-	public:
-		const Math::Vector3 GetPoint(float distance);
-	};
-}


Add an 'init' function for the initialization of strictly lower dynamic matrices in benchmarks

error: pathspec 'blazemark/blazemark/blaze/init/DynamicStrictlyLower.h' did not match any file(s) known to git

--- blazemark/blazemark/blaze/init/DynamicStrictlyLower.h
+++ blazemark/blazemark/blaze/init/DynamicStrictlyLower.h
@@ -0,0 +1,144 @@
+//=================================================================================================
+/*!
+//  \file blazemark/blaze/init/DynamicStrictlyLower.h
+//  \brief Header file for the Blaze strictly lower dynamic matrix initialization functions
+//
+//  Copyright (C) 2013 Klaus Iglberger - All Rights Reserved
+//
+//  This file is part of the Blaze library. You can redistribute it and/or modify it under
+//  the terms of the New (Revised) BSD License. Redistribution and use in source and binary
+//  forms, with or without modification, are permitted provided that the following conditions
+//  are met:
+//
+//  1. Redistributions of source code must retain the above copyright notice, this list of
+//     conditions and the following disclaimer.
+//  2. Redistributions in binary form must reproduce the above copyright notice, this list
+//     of conditions and the following disclaimer in the documentation and/or other materials
+//     provided with the distribution.
+//  3. Neither the names of the Blaze development group nor the names of its contributors
+//     may be used to endorse or promote products derived from this software without specific
+//     prior written permission.
+//
+//  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+//  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+//  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+//  SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+//  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+//  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+//  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+//  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+//  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+//  DAMAGE.
+*/
+//=================================================================================================
+
+#ifndef _BLAZEMARK_BLAZE_INIT_DYNAMICSTRICTLYLOWER_H_
+#define _BLAZEMARK_BLAZE_INIT_DYNAMICSTRICTLYLOWER_H_
+
+
+//*************************************************************************************************
+// Includes
+//*************************************************************************************************
+
+#include <vector>
+#include <blaze/math/DynamicMatrix.h>
+#include <blaze/math/StrictlyLowerMatrix.h>
+#include <blaze/util/Random.h>
+#include <blazemark/system/Types.h>
+
+
+namespace blazemark {
+
+namespace blaze {
+
+//=================================================================================================
+//
+//  INITIALIZATION FUNCTIONS
+//
+//=================================================================================================
+
+//*************************************************************************************************
+/*!\name Blaze initialization functions */
+//@{
+template< typename Type >
+void init( ::blaze::StrictlyLowerMatrix< ::blaze::DynamicMatrix<Type,::blaze::rowMajor> >& m );
+
+template< typename Type >
+void init( ::blaze::StrictlyLowerMatrix< ::blaze::DynamicMatrix<Type,::blaze::columnMajor> >& m );
+
+template< typename Type, bool SO >
+void init( ::std::vector< ::blaze::StrictlyLowerMatrix< ::blaze::DynamicMatrix<Type,SO> > >& v );
+//@}
+//*************************************************************************************************
+
+
+//*************************************************************************************************
+/*!\brief Random initialization of the given row-major strictly lower dynamic matrix.
+//
+// \param m The row-major strictly lower dynamic matrix to be initialized.
+// \return void
+//
+// This function initializes the given row-major strictly lower dynamic matrix with random values.
+*/
+template< typename Type >  // Data type of the matrix
+void init( ::blaze::StrictlyLowerMatrix< ::blaze::DynamicMatrix<Type,::blaze::rowMajor> >& m )
+{
+   const size_t N( m.rows() );
+
+   for( size_t i=1UL; i<N; ++i ) {
+      for( size_t j=0UL; j<i; ++j ) {
+         m(i,j) = ::blaze::rand<Type>( 0, 10 );
+      }
+   }
+}
+//*************************************************************************************************
+
+
+//*************************************************************************************************
+/*!\brief Random initialization of the given column-major strictly lower dynamic matrix.
+//
+// \param m The column-major strictly lower dynamic matrix to be initialized.
+// \return void
+//
+// This function initializes the given column-major strictly lower dynamic matrix with random values.
+*/
+template< typename Type >  // Data type of the matrix
+void init( ::blaze::StrictlyLowerMatrix< ::blaze::DynamicMatrix<Type,::blaze::columnMajor> >& m )
+{
+   const size_t N( m.rows() );
+
+   for( size_t j=0UL; j<N; ++j ) {
+      for( size_t i=j+1UL; i<N; ++i ) {
+         m(i,j) = ::blaze::rand<Type>( 0, 10 );
+      }
+   }
+}
+//*************************************************************************************************
+
+
+//*************************************************************************************************
+/*!\brief Random initialization of the given vector of strictly lower dynamic matrices.
+//
+// \param v The vector of strictly lower dynamic matrices to be initialized.
+// \return void
+//
+// This function initializes all strictly lower dynamic matrices in the given vector with random
+// values.
+*/
+template< typename Type  // Data type of the matrix
+        , bool SO >      // Storage order
+void init( ::std::vector< ::blaze::StrictlyLowerMatrix< ::blaze::DynamicMatrix<Type,SO> > >& v )
+{
+   const size_t size( v.size() );
+
+   for( size_t i=0UL; i<size; ++i ) {
+      init( v[i] );
+   }
+}
+//*************************************************************************************************
+
+} // namespace blaze
+
+} // namespace blazemark
+
+#endif


Update slide event method definition

Update slide event method definition

--- Settings/Controls/Slider.h
+++ Settings/Controls/Slider.h
@@ -32,6 +32,6 @@

 public:
     /* Event Handlers */
-    std::function<void(NMTRBTHUMBPOSCHANGING *pc)> OnSlide;
+    std::function<bool()> OnSlide;

 };


CallChannel: Add default parameters in the hangup() method

Normally a handler should call hangup() with these parameters,
except in very special cases.

--- TelepathyQt/call-channel.h
+++ TelepathyQt/call-channel.h
@@ -91,8 +91,8 @@
     PendingOperation *setRinging();
     PendingOperation *setQueued();
     PendingOperation *accept();
-    PendingOperation *hangup(CallStateChangeReason reason,
-            const QString &detailedReason, const QString &message);
+    PendingOperation *hangup(CallStateChangeReason reason = CallStateChangeReasonUserRequested,
+            const QString &detailedReason = QString(), const QString &message = QString());

     CallContents contents() const;
     CallContents contentsForType(MediaStreamType type) const;


change multipass renderer

change multipass renderer

--- Tempest/2d/surfacerender.h
+++ Tempest/2d/surfacerender.h
@@ -55,7 +55,8 @@
                    bool clrVbo   = true,
                    bool flushVbo = true,
                    int pass      = 0 ){
-      surf.nToUpdate = false;
+      if(pass==0)
+        surf.nToUpdate = false;

       PaintDev p(*this, sstk, sp, 0, 0, w,h);
       PaintEvent e(p,pass);


jni callInt

jni callInt

--- Tempest/system/jniextras.h
+++ Tempest/system/jniextras.h
@@ -75,6 +75,18 @@
         return nullptr;
         }

+      template<class ... Args>
+      jint callInt(JNIEnv &env, jobject self, const char* func,const char* sig,Args ... a) {
+        if(cls==nullptr || self==nullptr )
+          return 0;
+
+        jmethodID m = env.GetMethodID(cls,func,sig);
+        clearException(env);
+        if( m!=nullptr )
+          return env.CallIntMethod(self,m,a...);
+        return 0;
+        }
+
     private:
       JNIEnv* env=nullptr;
       jclass  cls=nullptr;


[DEV] Use the MD5Manager in autotest since it's implemented now.

--- TestBench/Linux/autoTest.c
+++ TestBench/Linux/autoTest.c
@@ -114,9 +114,7 @@
     eARSAL_ERROR arsalError = ARSAL_OK;
     ARUPDATER_Manager_t *manager = NULL;

-    // this md5Manager is useless with Unix target
     ARSAL_MD5_Manager_t* md5Manager = ARSAL_MD5_Manager_New(&arsalError);
-    fprintf(stderr, "****** Watch out, This autotest can't succeed on Unix because md5 checksum is not implemented ****\n");
     if (arsalError != ARSAL_OK)
     {
         error = ARUPDATER_ERROR_SYSTEM;
@@ -124,6 +122,7 @@

     if (error == ARUPDATER_OK)
     {
+        ARSAL_MD5_Manager_Init(md5Manager);
         manager = ARUPDATER_Manager_New(&error);
     }


No more interrupts. Optimisations

No more interrupts. Optimisations

--- hydrabus/hydrabus_sump.c
+++ hydrabus/hydrabus_sump.c
@@ -55,8 +55,8 @@
 {
 	htim.Instance = TIM4;

-	htim.Init.Period = 84 - 1;
-	htim.Init.Prescaler = 2*(config.divider+1) - 1;
+	htim.Init.Period = 42 - 1;
+	htim.Init.Prescaler = (config.divider+1) - 1;
 	htim.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
 	htim.Init.CounterMode = TIM_COUNTERMODE_UP;

@@ -76,21 +76,17 @@
 void sump_init(void)
 {
 	portc_init();
-	nvicEnableVector(TIM4_IRQn, CORTEX_PRIO_MASK(12));
 	tim_init();
 }

-CH_IRQ_HANDLER(STM32_TIM4_HANDLER)
-{
-	chSysLockFromISR();
+void get_sample(void)
+{

 	buffer[INDEX] = GPIOC->IDR;

 	if (config.state == SUMP_STATE_TRIGGED) {
 		config.delay_count--;
-	}
-
-	if (config.state == SUMP_STATE_ARMED) {
+	}else if (config.state == SUMP_STATE_ARMED) {
 		if ( (buffer[INDEX] & config.trigger_masks[0]) == (config.trigger_values[0] & config.trigger_masks[0]) ) {
 			config.state = SUMP_STATE_TRIGGED;
 		}
@@ -98,18 +94,16 @@

 	if (config.delay_count == 0) {
 		config.state = SUMP_STATE_IDLE;
-		HAL_TIM_Base_Stop_IT(&htim);
-	}
-
-	if (INDEX == STATES_LEN - 1) {
+		HAL_TIM_Base_Stop(&htim);
+	}
+
+    INDEX++;
+	if (INDEX == STATES_LEN) {
 		INDEX=0;
-	}else{
-		INDEX++;
 	}

 	TIM4->SR &= ~TIM_SR_UIF;  //clear overflow flag

-	chSysUnlockFromISR();
 }

 void sump_deinit(void)
@@ -151,9 +145,12 @@
 				case SUMP_RUN:
 					INDEX=0;
 					config.state = SUMP_STATE_ARMED;
-					HAL_TIM_Base_Start_IT(&htim);
+					HAL_TIM_Base_Start(&htim);

 					while(TIM4->CR1 & TIM_CR1_CEN) { /* Sleep for capture to finish */
+                        if (TIM4->SR & TIM_SR_UIF) {
+                            get_sample();
+                        }
 					}

 					while(config.read_count > 0) {
@@ -244,6 +241,7 @@
 								config.divider |= sump_parameters[1];
 								config.divider <<= 8;
 								config.divider |= sump_parameters[0];
+								config.divider /= 100; /* Assuming 100MHz base frequency */
 								tim_set_prescaler();
 								break;
 							case SUMP_FLAGS:


shared: fail reading a directory as a config file

open() will happily open directories and other non-normal files.
Attempting to parse them as config files makes no sense, so check that
the opened file is indeed a regular file.

Signed-off-by: Pekka Paalanen <0f6ae7001e34c37b02fb2c1c2573ddf8f442136a@collabora.co.uk>
Reviewed-by: Jonny Lamb <3d1fb3642aaab2ff70e3392a5ab916bf99eed6a3@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <92313f26b3566e64b50391ce0051fc0e1f775402@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bdb14cfc1ab8d24e13de84adc40b41ae60c13bd1@osg.samsung.com>

--- shared/config-parser.c
+++ shared/config-parser.c
@@ -326,6 +326,7 @@
 {
 	FILE *fp;
 	char line[512], *p;
+	struct stat filestat;
 	struct weston_config *config;
 	struct weston_config_section *section = NULL;
 	int i, fd;
@@ -338,6 +339,13 @@

 	fd = open_config_file(config, name);
 	if (fd == -1) {
+		free(config);
+		return NULL;
+	}
+
+	if (fstat(fd, &filestat) < 0 ||
+	    !S_ISREG(filestat.st_mode)) {
+		close(fd);
 		free(config);
 		return NULL;
 	}


Added a couple of MYSQLPP_EXPORT tags in front of functions that should
be exported.

git-svn-id: 1a57124bbb9aca193a920d0ffd753d488afb922b@1295 5946f024-35f4-0310-b1b3-9a3be3380cfb

--- lib/connection.h
+++ lib/connection.h
@@ -258,7 +258,7 @@
 	/// \retval nonzero if either we already know the connection is down
 	/// and cannot re-establish it, or if the server did not respond to
 	/// the ping and we could not re-establish the connection.
-	int ping();
+	MYSQLPP_EXPORT int ping();

 	/// \brief Kill a MySQL server thread
 	///
@@ -444,7 +444,7 @@
 	///
 	/// Version will be of the form X.Y.Z, where X is the major version
 	/// number, Y the minor version, and Z the bug fix number.
-	std::ostream& api_version(std::ostream& os);
+	MYSQLPP_EXPORT std::ostream& api_version(std::ostream& os);

 protected:
 	/// \brief Drop the connection to the database server


added function to get event duration

added function to get event duration

--- hmmcons_fast.c
+++ hmmcons_fast.c
@@ -85,6 +85,13 @@
     KHMMParameters parameters[2];
 };

+double get_duration(const CSquiggleRead& read, uint32_t event_idx, uint32_t strand)
+{
+    double e_start = read.events[strand].time[event_idx];
+    double e_end = read.events[strand].time[event_idx + 1];
+    return e_end - e_start;
+}
+
 double get_drift_corrected_level(const CSquiggleRead& read, uint32_t event_idx, uint32_t strand)
 {
     double level = read.events[strand].level[event_idx];


Doxygen comment improvements

Doxygen comment improvements

git-svn-id: 1a57124bbb9aca193a920d0ffd753d488afb922b@1787 5946f024-35f4-0310-b1b3-9a3be3380cfb

--- lib/exceptions.h
+++ lib/exceptions.h
@@ -161,7 +161,7 @@
 public:
 	/// \brief Create exception object
 	///
-	/// \param bad_field name of field the MySQL server didn't like
+	/// \param bad_field name of field the database server didn't like
 	explicit BadFieldName(const char* bad_field) :
 	Exception(std::string("Unknown field name: ") + bad_field)
 	{
@@ -248,12 +248,16 @@
 };

-/// \brief Exception thrown when MySQL encounters a problem while
-/// processing your query.
+/// \brief Exception thrown when the database server encounters a problem
+/// while processing your query.
 ///
-/// This exception is typically only thrown when the server rejects a
-/// SQL query.  In v1.7, it was used as a more generic exception type,
-/// for no particularly good reason.
+/// Beware that in older versions of MySQL++, this was effectively the
+/// generic exception type.  (This is most especially true in v1.7.x,
+/// but it continued to a lesser extent through the v2.x series.)  When
+/// converting old code to new versions of MySQL++, it's therefore
+/// possible to get seemingly "new" exceptions thrown, which could crash
+/// your program if you don't also catch a more generic type like
+/// mysqlpp::Exception or std::exception.

 class MYSQLPP_EXPORT BadQuery : public Exception
 {


Cleaned up includes and template functions

--- src/include/index/skiplist.h
+++ src/include/index/skiplist.h
@@ -11,17 +11,6 @@
 //===----------------------------------------------------------------------===//

 # pragma once
-
-#include <algorithm>
-#include <array>
-#include <atomic>
-#include <cassert>
-#include <chrono>
-#include <thread>
-#include <unordered_set>
-// offsetof() is defined here
-#include <vector>
-#include <cstddef>

 namespace peloton {
 namespace index {
@@ -38,11 +27,11 @@
                                               typename ValueHashFunc>
 template <typename KeyType,
           typename ValueType,
-          typename KeyComparator = std::less<KeyType>,
-          typename KeyEqualityChecker = std::equal_to<KeyType>,
-          typename KeyHashFunc = std::hash<KeyType>,
-          typename ValueEqualityChecker = std::equal_to<ValueType>,
-          typename ValueHashFunc = std::hash<ValueType>>
+          typename KeyComparator,
+          typename KeyEqualityChecker,
+          typename KeyHashFunc,
+          typename ValueEqualityChecker,
+          typename ValueHashFunc>
 class SkipList {

   // Add your declarations here


Remove MMCacheLock -- it is no longer used. Per ITAGAKI Takahiro.

--- src/include/storage/lwlock.h
+++ src/include/storage/lwlock.h
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.20 2005/06/17 22:32:50 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.21 2005/07/27 08:05:36 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -33,7 +33,6 @@
 	ProcArrayLock,
 	SInvalLock,
 	FreeSpaceLock,
-	MMCacheLock,
 	WALInsertLock,
 	WALWriteLock,
 	ControlFileLock,


C comment:  mention 1500-02-29 as an invalid date

It is invalid because the Gregorian calendar is used for all years.

--- src/include/utils/datetime.h
+++ src/include/utils/datetime.h
@@ -274,7 +274,9 @@
 /*
  * These are the rules for the Gregorian calendar, which was adopted in 1582.
  * However, we use this calculation for all prior years as well because the
- * SQL standard specifies use of the Gregorian calendar.
+ * SQL standard specifies use of the Gregorian calendar.  This prevents the
+ * date 1500-02-29 from being stored, even though it is valid in the Julian
+ * calendar.
  */
 #define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))


fixed slight error

fixed slight error

--- src/jayfor.c
+++ src/jayfor.c
@@ -128,10 +128,10 @@
 		// output bytecode to file, overwrite existing
 		FILE *output = fopen(EXECUTABLE_FILENAME, "wb");
 		if (!output) {
-			perror("fopen: failed to create executable %s\n", EXECUTABLE_FILENAME);
+			perror("fopen: failed to create executable\n");
 			exit(1);
 		}
-
+
 		int i;
 		for (i = 0; i < self->compiler->current_instruction; i++) {
 			if (i % 8 == 0 && i != 0) {


Added stub for extended radio API for seedeye


libmetrics: white space and style fixes for get_ifi_info

git-svn-id: 27e0aca8c7a52a9ae65dfba2e16879604119af8c@1601 93a4e39c-3214-0410-bb16-828d8e3bcd0f

--- libmetrics/get_ifi_info.c
+++ libmetrics/get_ifi_info.c
@@ -6,16 +6,15 @@
 /* For older versions of Solaris... */
 #include <sys/sockio.h>
 #endif
-

 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 #include <signal.h>
+#include <gm_msg.h>

 #include "unpifi.h"
-#include <gm_msg.h>

 /* HP-UX, Solaris */
 #if !defined(ifr_mtu) && defined(ifr_metric)


glcontext_egl: create a debug context if DEBUG_GL is defined

Signed-off-by: Matthieu Bouron <3a7e863fe913178152052b1d1157ef537eee421e@gmail.com>

--- libnodegl/glcontext_egl.c
+++ libnodegl/glcontext_egl.c
@@ -318,6 +318,9 @@
                 EGL_CONTEXT_MAJOR_VERSION_KHR, gl_versions[i].major,
                 EGL_CONTEXT_MINOR_VERSION_KHR, gl_versions[i].minor,
                 EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR, EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR,
+#ifdef DEBUG_GL
+                EGL_CONTEXT_FLAGS_KHR, EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR,
+#endif
                 EGL_NONE
             };


Minor PD external fix

Minor PD external fix

--- examples/puredata/xtract~.c
+++ examples/puredata/xtract~.c
@@ -244,5 +244,5 @@
     class_addmethod(xtract_class,
 	    (t_method)xtract_tilde_show_help, gensym("help"), A_DEFSYMBOL, 0);
     CLASS_MAINSIGNALIN(xtract_class, t_xtract_tilde, f);
-    class_sethelpsymbol(xtract_class, gensym("help-flib"));
-}
+    class_sethelpsymbol(xtract_class, gensym("help-xtract"));
+}


Do not wait when kafka_destroy is called, and break consume loop if read_count < 0

--- kafka.c
+++ kafka.c
@@ -82,7 +82,8 @@
 {
     if(rk != NULL) {
         rd_kafka_destroy(rk);
-        rd_kafka_wait_destroyed(1000);
+        //this wait is blocking PHP
+        //rd_kafka_wait_destroyed(1000);
         rk = NULL;
     }
 }
@@ -262,7 +263,7 @@
         syslog(LOG_INFO, "phpkafka - read_counter: %d", read_counter);
         if (read_counter == -1) {
           run = 0;
-          continue;
+          break;//do not continue, will result in UB => rkmessage is invalid pointer!
         }
       }


Whitespace changes

Whitespace changes

--- library/ns-wine-library.c
+++ library/ns-wine-library.c
@@ -412,7 +412,6 @@
     }

   return TRUE;
-
 }

@@ -437,7 +436,7 @@
     }

   n_left =  ns_msg_get_body_size (msg);
-
+
   while (n_left > 0)
     {
       gssize n;
@@ -457,8 +456,9 @@
 	  ns_msg_free (msg);
 	  return NULL;
 	}
-
+
       n_left = ns_msg_body_read_from_wire (msg, buf, (size_t) n);
+
     }

   /* ns_msg_dump (msg); */


Add a comment expliciting usage of internal PAKE step/state/sequence enums

Signed-off-by: Neil Armstrong <619b324efbf5f7848de055bdc8bef4c0dd7c8ef5@baylibre.com>

--- library/psa_crypto_pake.c
+++ library/psa_crypto_pake.c
@@ -101,6 +101,67 @@
     PSA_PAKE_INPUT_X4S          = 6,
 };

+/*
+ * The first PAKE step shares the same sequences of the second PAKE step
+ * but with a second set of KEY_SHARE/ZK_PUBLIC/ZK_PROOF outputs/inputs.
+ * This it's simpler to share the same sequences numbers of the first
+ * set of KEY_SHARE/ZK_PUBLIC/ZK_PROOF outputs/inputs in both PAKE steps.
+ *
+ * State sequence with step, state & sequence enums:
+ *   => Input & Output Step = PSA_PAKE_STEP_INVALID
+ *   => state = PSA_PAKE_STATE_INVALID
+ *   psa_pake_setup()
+ *   => Input & Output Step = PSA_PAKE_STEP_X1_X2
+ *   => state = PSA_PAKE_STATE_SETUP
+ *   => sequence = PSA_PAKE_SEQ_INVALID
+ *   |
+ *   |--- In any order: (First round input before or after first round output)
+ *   |   | First call of psa_pake_output() or psa_pake_input() sets
+ *   |   | state = PSA_PAKE_STATE_READY
+ *   |   |
+ *   |   |------ In Order: => state = PSA_PAKE_OUTPUT_X1_X2
+ *   |   |       | psa_pake_output() => sequence = PSA_PAKE_X1_STEP_KEY_SHARE
+ *   |   |       | psa_pake_output() => sequence = PSA_PAKE_X1_STEP_ZK_PUBLIC
+ *   |   |       | psa_pake_output() => sequence = PSA_PAKE_X1_STEP_ZK_PROOF
+ *   |   |       | psa_pake_output() => sequence = PSA_PAKE_X2_STEP_KEY_SHARE
+ *   |   |       | psa_pake_output() => sequence = PSA_PAKE_X2_STEP_ZK_PUBLIC
+ *   |   |       | psa_pake_output() => sequence = PSA_PAKE_X2_STEP_ZK_PROOF
+ *   |   |       | => state = PSA_PAKE_STATE_READY
+ *   |   |       | => sequence = PSA_PAKE_SEQ_INVALID
+ *   |   |       \ => Output Step = PSA_PAKE_STEP_X2S
+ *   |   |
+ *   |   |------ In Order: => state = PSA_PAKE_INPUT_X1_X2
+ *   |   |       | psa_pake_input() => sequence = PSA_PAKE_X1_STEP_KEY_SHARE
+ *   |   |       | psa_pake_input() => sequence = PSA_PAKE_X1_STEP_ZK_PUBLIC
+ *   |   |       | psa_pake_input() => sequence = PSA_PAKE_X1_STEP_ZK_PROOF
+ *   |   |       | psa_pake_input() => sequence = PSA_PAKE_X2_STEP_KEY_SHARE
+ *   |   |       | psa_pake_input() => sequence = PSA_PAKE_X2_STEP_ZK_PUBLIC
+ *   |   |       | psa_pake_input() => sequence = PSA_PAKE_X2_STEP_ZK_PROOF
+ *   |   |       | => state = PSA_PAKE_STATE_READY
+ *   |   |       | => sequence = PSA_PAKE_SEQ_INVALID
+ *   |   |       \ => Output Step = PSA_PAKE_INPUT_X4S
+ *   |
+ *   |--- In any order: (Second round input before or after second round output)
+ *   |   |
+ *   |   |------ In Order: => state = PSA_PAKE_OUTPUT_X2S
+ *   |   |       | psa_pake_output() => sequence = PSA_PAKE_X1_STEP_KEY_SHARE
+ *   |   |       | psa_pake_output() => sequence = PSA_PAKE_X1_STEP_ZK_PUBLIC
+ *   |   |       | psa_pake_output() => sequence = PSA_PAKE_X1_STEP_ZK_PROOF
+ *   |   |       | => state = PSA_PAKE_STATE_READY
+ *   |   |       | => sequence = PSA_PAKE_SEQ_INVALID
+ *   |   |       \ => Output Step = PSA_PAKE_STEP_DERIVE
+ *   |   |
+ *   |   |------ In Order: => state = PSA_PAKE_INPUT_X4S
+ *   |   |       | psa_pake_input() => sequence = PSA_PAKE_X1_STEP_KEY_SHARE
+ *   |   |       | psa_pake_input() => sequence = PSA_PAKE_X1_STEP_ZK_PUBLIC
+ *   |   |       | psa_pake_input() => sequence = PSA_PAKE_X1_STEP_ZK_PROOF
+ *   |   |       | => state = PSA_PAKE_STATE_READY
+ *   |   |       | => sequence = PSA_PAKE_SEQ_INVALID
+ *   |   |       \ => Output Step = PSA_PAKE_STEP_DERIVE
+ *   |
+ *   psa_pake_get_implicit_key()
+ *   => Input & Output Step = PSA_PAKE_STEP_INVALID
+ */
 enum psa_pake_sequence
 {
     PSA_PAKE_SEQ_INVALID        = 0,


Improve the 'Last calls' section included in crash dumps

--- erts/emulator/beam/break.c
+++ erts/emulator/beam/break.c
@@ -348,11 +348,11 @@
 	     if (j < 0)
 		j += scb->len;
 	     if (scb->ct[j] == &exp_send)
-		erts_print(to, to_arg, "send");
+		erts_print(to, to_arg, "send\n");
 	     else if (scb->ct[j] == &exp_receive)
-		erts_print(to, to_arg, "'receive'");
+		erts_print(to, to_arg, "'receive'\n");
 	     else if (scb->ct[j] == &exp_timeout)
-		   erts_print(to, to_arg, "timeout");
+		   erts_print(to, to_arg, "timeout\n");
 	     else
 		 erts_print(to, to_arg, "%T:%T/%bpu\n",
 			    scb->ct[j]->info.mfa.module,


BUG: getMaxEventsInBothArrays(): loop termination wrong

--- host/pybar/analysis/RawDataConverter/AnalysisFunctions.h
+++ host/pybar/analysis/RawDataConverter/AnalysisFunctions.h
@@ -96,7 +96,7 @@

 		if ( (tSecondActualEventNumber <= tFirstActualEventNumber) || first_finished ){
 			unsigned int jj;
-			for (jj=j; j < rSizeArrayTwo; ++jj){
+			for (jj=j; jj < rSizeArrayTwo; ++jj){
 				if (rEventArrayTwo[jj] == tSecondActualEventNumber)
 					tSecondActualOccurrence++;
 				else break;
@@ -105,7 +105,7 @@
 		}

 //		std::cout<<"tFirstActualEventNumber "<<tFirstActualEventNumber<<" "<<tFirstActualOccurrence<<" "<<first_finished<<std::endl;
-//		std::cout<<"tSecondActualEventNumber"<<tSecondActualEventNumber<<" "<<tSecondActualOccurrence<<" "<<second_finished<<std::endl;
+//		std::cout<<"tSecondActualEventNumber "<<tSecondActualEventNumber<<" "<<tSecondActualOccurrence<<" "<<second_finished<<std::endl;

 		if (tFirstActualEventNumber == tSecondActualEventNumber){
 //			std::cout<<"==, add "<<std::max(tFirstActualOccurrence, tSecondActualOccurrence)<<" x "<<tFirstActualEventNumber<<std::endl;