added my Recipes
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
From 5429ab90eb33eb243fa7b9cd247e0490d72b9da5 Mon Sep 17 00:00:00 2001
|
||||
From: Otavio Salvador <otavio@ossystems.com.br>
|
||||
Date: Wed, 9 Sep 2015 15:04:45 +0000
|
||||
Subject: [PATCH] Drop 'inline' of crc32 function to fix build using GCC 5.2
|
||||
Organization: O.S. Systems Software LTDA.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
||||
---
|
||||
crc32.h | 1 -
|
||||
crc32.o | Bin 748 -> 2056 bytes
|
||||
2 files changed, 1 deletion(-)
|
||||
|
||||
diff --git a/crc32.h b/crc32.h
|
||||
index 62b3433..8fc62b6 100644
|
||||
--- a/crc32.h
|
||||
+++ b/crc32.h
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef CRC32_H
|
||||
#define CRC32_H
|
||||
|
||||
-inline
|
||||
unsigned long crc32( const void* const buffer,
|
||||
unsigned long length,
|
||||
unsigned long crc);
|
||||
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
From b08e61ef64eece23ce8ffa2784cd3c4f70b6169e Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 17 Jun 2017 08:08:56 -0700
|
||||
Subject: [PATCH] Specify printf formats
|
||||
|
||||
Fixes
|
||||
tiotest.c:555:4: error: format not a string literal and no format arguments [-Werror=format-security]
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
tiotest.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tiotest.c b/tiotest.c
|
||||
index 6b3d0c3..3e6166a 100644
|
||||
--- a/tiotest.c
|
||||
+++ b/tiotest.c
|
||||
@@ -91,7 +91,7 @@ inline void checkIntZero(int value, char *mess)
|
||||
{
|
||||
if (value <= 0)
|
||||
{
|
||||
- printf(mess);
|
||||
+ printf("%s",mess);
|
||||
printf("Try 'tiotest -h' for more information.\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ inline void checkLong(long value, char *mess)
|
||||
{
|
||||
if (value < 0)
|
||||
{
|
||||
- printf(mess);
|
||||
+ printf("%s", mess);
|
||||
printf("Try 'tiotest -h' for more information\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -552,7 +552,7 @@ void do_test( ThreadTest *test, int testCase, int sequential,
|
||||
if(args.debugLevel > 4)
|
||||
{
|
||||
printf("Created %d threads\n", i);
|
||||
- fprintf(stderr, debugMessage);
|
||||
+ fprintf(stderr, "%s", debugMessage);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
--
|
||||
2.13.1
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From: Otavio Salvador <otavio@ossystems.com.br>
|
||||
Subject: [PATCH] Avoid aligned allocation function name clashes
|
||||
|
||||
glibc added new methods for aligned allocation and it clashes with the
|
||||
local version used by 'tiobench'. To fix it, we prefix the methods
|
||||
with '_'.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
||||
---
|
||||
tiotest.c | 8 ++++----
|
||||
1 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tiotest.c b/tiotest.c
|
||||
index 38f54e7..6b3d0c3 100644
|
||||
--- a/tiotest.c
|
||||
+++ b/tiotest.c
|
||||
@@ -31,7 +31,7 @@ static const char* versionStr = "tiotest v0.3.3 (C) 1999-2000 Mika Kuoppala <mik
|
||||
*/
|
||||
ArgumentOptions args;
|
||||
|
||||
-static void * aligned_alloc(ssize_t size)
|
||||
+static void * _aligned_alloc(ssize_t size)
|
||||
{
|
||||
caddr_t a;
|
||||
a = mmap((caddr_t )0, size,
|
||||
@@ -41,7 +41,7 @@ static void * aligned_alloc(ssize_t size)
|
||||
return a;
|
||||
}
|
||||
|
||||
-static int aligned_free(caddr_t a, ssize_t size)
|
||||
+static int _aligned_free(caddr_t a, ssize_t size)
|
||||
{
|
||||
return munmap(a, size);
|
||||
}
|
||||
@@ -281,7 +281,7 @@ void initialize_test( ThreadTest *d )
|
||||
pthread_attr_setscope(&(d->threads[i].thread_attr),
|
||||
PTHREAD_SCOPE_SYSTEM);
|
||||
|
||||
- d->threads[i].buffer = aligned_alloc( d->threads[i].blockSize );
|
||||
+ d->threads[i].buffer = _aligned_alloc( d->threads[i].blockSize );
|
||||
if( d->threads[i].buffer == NULL )
|
||||
{
|
||||
perror("Error allocating memory");
|
||||
@@ -383,7 +383,7 @@ void cleanup_test( ThreadTest *d )
|
||||
{
|
||||
if (!args.rawDrives)
|
||||
unlink(d->threads[i].fileName);
|
||||
- aligned_free( d->threads[i].buffer, d->threads[i].blockSize );
|
||||
+ _aligned_free( d->threads[i].buffer, d->threads[i].blockSize );
|
||||
d->threads[i].buffer = 0;
|
||||
|
||||
pthread_attr_destroy( &(d->threads[i].thread_attr) );
|
||||
--
|
||||
1.7.7
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
Adapt tiobench to OE
|
||||
Author: Ludovic Desroches <ludovic.desroches@atmel.com>
|
||||
|
||||
Upstream-Status: Inappropriate [not author]
|
||||
|
||||
Index: Makefile
|
||||
===================================================================
|
||||
--- a/Makefile 2011-05-26 07:48:46.341400974 +0200
|
||||
+++ b/Makefile 2011-05-30 06:32:38.091401358 +0200
|
||||
@@ -1,8 +1,9 @@
|
||||
# Makefile for tiotest
|
||||
|
||||
-CC=gcc
|
||||
+CC?=gcc
|
||||
#CFLAGS=-O3 -fomit-frame-pointer -Wall
|
||||
CFLAGS=-O2 -Wall
|
||||
+LDFLAGS?=
|
||||
|
||||
#DEFINES=-DUSE_MMAP
|
||||
#-DUSE_MADVISE
|
||||
@@ -14,16 +15,16 @@
|
||||
|
||||
#DEFINES=
|
||||
|
||||
-LINK=gcc
|
||||
+LINK?=$(CC)
|
||||
EXE=tiotest
|
||||
PROJECT=tiobench
|
||||
# do it once instead of each time referenced
|
||||
VERSION=$(shell egrep "tiotest v[0-9]+.[0-9]+" tiotest.c | cut -d " " -f 7 | sed "s/v//g")
|
||||
DISTNAME=$(PROJECT)-$(VERSION)
|
||||
INSTALL=install
|
||||
-PREFIX=/usr/local
|
||||
+PREFIX?=/usr/local
|
||||
BINDIR=$(PREFIX)/bin
|
||||
-DOCDIR=/usr/local/doc/$(DISTNAME)
|
||||
+DOCDIR=$(PREFIX)/share/doc/$(DISTNAME)
|
||||
|
||||
all: $(EXE)
|
||||
|
||||
@@ -34,7 +35,7 @@
|
||||
$(CC) -c $(CFLAGS) $(DEFINES) tiotest.c -o tiotest.o
|
||||
|
||||
$(EXE): tiotest.o crc32.o
|
||||
- $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread
|
||||
+ $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread $(LDFLAGS)
|
||||
@echo
|
||||
@echo "./tiobench.pl --help for usage options"
|
||||
@echo
|
||||
Reference in New Issue
Block a user