Commit 5954e961 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Add copyrights using #ident on the top of newbrt sources. Addresses #54.

git-svn-id: file:///svn/tokudb@817 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4634c225
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Insert a bunch of stuff */ /* Insert a bunch of stuff */
#include "brt.h" #include "brt.h"
#include "key.h" #include "key.h"
......
#ifndef BRT_INTERNAL_H #ifndef BRT_INTERNAL_H
#define BRT_INTERNAL_H #define BRT_INTERNAL_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "cachetable.h" #include "cachetable.h"
#include "hashtable.h" #include "hashtable.h"
#include "pma.h" #include "pma.h"
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt-internal.h" #include "brt-internal.h"
#include <fcntl.h> #include <fcntl.h>
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#define _XOPEN_SOURCE 500 #define _XOPEN_SOURCE 500
//#include "pma.h" //#include "pma.h"
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt.h" #include "brt.h"
#include "key.h" #include "key.h"
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Verify a BRT. */ /* Verify a BRT. */
/* Check: /* Check:
* the fingerprint of every node (local check) * the fingerprint of every node (local check)
......
/* -*- mode: C; c-basic-offset: 4 -*- */ /* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Buffered repository tree. /* Buffered repository tree.
* Observation: The in-memory representation of a node doesn't have to be the same as the on-disk representation. * Observation: The in-memory representation of a node doesn't have to be the same as the on-disk representation.
* Goal for the in-memory representation: fast * Goal for the in-memory representation: fast
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ifndef BRT_H #ifndef BRT_H
#define BRT_H #define BRT_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
// This must be first to make the 64-bit file mode work right in Linux // This must be first to make the 64-bit file mode work right in Linux
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
......
#ifndef BRTTYPES_H #ifndef BRTTYPES_H
#define BRTTYPES_H #define BRTTYPES_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <sys/types.h> #include <sys/types.h>
#define _XOPEN_SOURCE 500 #define _XOPEN_SOURCE 500
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
......
/* -*- mode: C; c-basic-offset: 4 -*- */ /* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "memory.h" #include "memory.h"
#include "cachetable.h" #include "cachetable.h"
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "cachetable.h" #include "cachetable.h"
#include "memory.h" #include "memory.h"
......
#ifndef CACHETABLE_H #ifndef CACHETABLE_H
#define CACHETABLE_H #define CACHETABLE_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <fcntl.h> #include <fcntl.h>
#include "brttypes.h" #include "brttypes.h"
......
#ifndef TOKU_CRC_H #ifndef TOKU_CRC_H
#define TOKU_CRC_H #define TOKU_CRC_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <zlib.h> #include <zlib.h>
// zlib crc32 has a bug: If len==0 then it should return oldcrc32, but crc32 returns 0. // zlib crc32 has a bug: If len==0 then it should return oldcrc32, but crc32 returns 0.
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <arpa/inet.h> #include <arpa/inet.h>
#include <assert.h> #include <assert.h>
#include "brt-internal.h" #include "brt-internal.h"
......
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
// FNV Hash: From an idea sent by Glenn Fowler and Phong Vo to the IEEE POSIX 1003.2 committee. Landon Curt Noll improved it. // FNV Hash: From an idea sent by Glenn Fowler and Phong Vo to the IEEE POSIX 1003.2 committee. Landon Curt Noll improved it.
// See: http://isthe.com/chongo/tech/comp/fnv/ // See: http://isthe.com/chongo/tech/comp/fnv/
static inline unsigned int hash_key (const unsigned char *key, unsigned long keylen) { static inline unsigned int hash_key (const unsigned char *key, unsigned long keylen) {
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Hash table with chaining. */ /* Hash table with chaining. */
#include "hashtable.h" #include "hashtable.h"
#include "memory.h" #include "memory.h"
......
#ifndef HASHTABLE_H #ifndef HASHTABLE_H
#define HASHTABLE_H #define HASHTABLE_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brttypes.h" #include "brttypes.h"
/* Hash table with chaining. */ /* Hash table with chaining. */
/* The keys and values are byte sequences. */ /* The keys and values are byte sequences. */
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "key.h" #include "key.h"
#include "hashtable.h" #include "hashtable.h"
#include "memory.h" #include "memory.h"
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt-internal.h" #include "brt-internal.h"
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt-internal.h" #include "brt-internal.h"
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
......
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "ybt.h" #include "ybt.h"
#include "brttypes.h" #include "brttypes.h"
......
#ifndef KV_PAIR_H #ifndef KV_PAIR_H
#define KV_PAIR_H #define KV_PAIR_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "memory.h" #include "memory.h"
#include <string.h> #include <string.h>
......
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
// This list is intended to be embedded in other data structures. // This list is intended to be embedded in other data structures.
struct list { struct list {
struct list *next, *prev; struct list *next, *prev;
......
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#if defined(__x86_64) || defined(__i386) #if defined(__x86_64) || defined(__i386)
static inline void mfence (void) { static inline void mfence (void) {
......
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "log-internal.h" #include "log-internal.h"
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <arpa/inet.h> #include <arpa/inet.h>
#include <ctype.h> #include <ctype.h>
#include <dirent.h> #include <dirent.h>
......
#ifndef TOKULOGGGER_H #ifndef TOKULOGGGER_H
#define TOKULOGGGER_H #define TOKULOGGGER_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "../include/db.h" #include "../include/db.h"
#include "brttypes.h" #include "brttypes.h"
#include "kv-pair.h" #include "kv-pair.h"
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* This file defines the logformat in an executable fashion. /* This file defines the logformat in an executable fashion.
* This code is used to generate * This code is used to generate
* The code that writes into the log. * The code that writes into the log.
...@@ -269,6 +272,7 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__u ...@@ -269,6 +272,7 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__u
cf = fopen(codepath, "w"); assert(cf!=0); cf = fopen(codepath, "w"); assert(cf!=0);
hf = fopen(headerpath, "w"); assert(hf!=0); hf = fopen(headerpath, "w"); assert(hf!=0);
fprintf2(cf, hf, "/* Do not edit this file. This code generated by logformat.c. Copyright 2007 Tokutek. */\n"); fprintf2(cf, hf, "/* Do not edit this file. This code generated by logformat.c. Copyright 2007 Tokutek. */\n");
fprintf2(cf, hf, "#ident \"Copyright (c) 2007 Tokutek Inc. All rights reserved.\"\n");
fprintf(cf, "#include <stdio.h>\n"); fprintf(cf, "#include <stdio.h>\n");
fprintf(hf, "#include \"brt-internal.h\"\n"); fprintf(hf, "#include \"brt-internal.h\"\n");
fprintf(cf, "#include \"log_header.h\"\n"); fprintf(cf, "#include \"log_header.h\"\n");
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "mdict.h" #include "mdict.h"
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "mdict.h" #include "mdict.h"
#include "memory.h" #include "memory.h"
#define USEPMA #define USEPMA
......
#ifndef MDICT_H #ifndef MDICT_H
#define MDICT_H #define MDICT_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brttypes.h" #include "brttypes.h"
//#define USEPMA //#define USEPMA
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "memory.h" #include "memory.h"
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
......
#ifndef MEMORY_H #ifndef MEMORY_H
#define MEMORY_H #define MEMORY_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
//#include <stdlib.h> //#include <stdlib.h>
/* Tokutek memory allocation functions and macros. /* Tokutek memory allocation functions and macros.
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <stdio.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
#include "mempool.h" #include "mempool.h"
......
#ifndef _TOKU_MEMPOOL_H #ifndef _TOKU_MEMPOOL_H
#define _TOKU_MEMPOOL_H #define _TOKU_MEMPOOL_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* a memory pool is a contiguous region of memory that supports single /* a memory pool is a contiguous region of memory that supports single
allocations from the pool. these allocated regions are never recycled. allocations from the pool. these allocated regions are never recycled.
when the memory pool no longer has free space, the allocated chunks when the memory pool no longer has free space, the allocated chunks
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "myassert.h" #include "myassert.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
#ifndef MYASSERT_H #ifndef MYASSERT_H
#define MYASSERT_H #define MYASSERT_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#ifndef TESTER #ifndef TESTER
#include <assert.h> #include <assert.h>
#else #else
......
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "pma.h" #include "pma.h"
#include "mempool.h" #include "mempool.h"
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt-internal.h" #include "brt-internal.h"
#include "key.h" #include "key.h"
#include <assert.h> #include <assert.h>
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* An in-memory Packed Memory Array dictionary. /* An in-memory Packed Memory Array dictionary.
The keys and values are arrays of bytes, but are not necessarily kept in scan order. The keys and values are arrays of bytes, but are not necessarily kept in scan order.
Only the pointers are kept. Only the pointers are kept.
......
#ifndef PMA_H #ifndef PMA_H
#define PMA_H #define PMA_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brttypes.h" #include "brttypes.h"
#include "ybt.h" #include "ybt.h"
#include "yerror.h" #include "yerror.h"
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h> #include <assert.h>
static int is_prime (int n) { static int is_prime (int n) {
......
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Return the smallest prime >= 2^(idx+1) /* Return the smallest prime >= 2^(idx+1)
* Only works for idx<30 */ * Only works for idx<30 */
int toku_get_prime (unsigned int idx); int toku_get_prime (unsigned int idx);
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Test random insertions using db4 */ /* Test random insertions using db4 */
#include <assert.h> #include <assert.h>
#include <db.h> #include <db.h>
......
#ifndef RBUF_H #ifndef RBUF_H
#define RBUF_H #define RBUF_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h> #include <assert.h>
struct rbuf { struct rbuf {
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Recover an env. The logs are in argv[1]. The new database is created in the cwd. */ /* Recover an env. The logs are in argv[1]. The new database is created in the cwd. */
// Test: // Test:
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Readers/writers locks implementation /* Readers/writers locks implementation
* *
***************************************** *****************************************
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Dump the log from stdin to stdout. */ /* Dump the log from stdin to stdout. */
#include <arpa/inet.h> #include <arpa/inet.h>
#include <assert.h> #include <assert.h>
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
......
#ifndef WBUF_H #ifndef WBUF_H
#define WBUF_H #define WBUF_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
......
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
#include "ybt.h" #include "ybt.h"
......
#ifndef YBT_H #ifndef YBT_H
#define YBT_H #define YBT_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
// brttypes.h must be first to make 64-bit file mode work right in linux. // brttypes.h must be first to make 64-bit file mode work right in linux.
#include "brttypes.h" #include "brttypes.h"
#include "../include/db.h" #include "../include/db.h"
......
#ifndef YERROR_H #ifndef YERROR_H
#define YERROR_H #define YERROR_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
enum pma_errors { BRT_OK=0, BRT_ALREADY_THERE = -2, BRT_KEYEMPTY=-3 }; enum pma_errors { BRT_OK=0, BRT_ALREADY_THERE = -2, BRT_KEYEMPTY=-3 };
enum typ_tag { TYP_BRTNODE = 0xdead0001, enum typ_tag { TYP_BRTNODE = 0xdead0001,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment