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

git-svn-id: file:///svn/tokudb@817 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Bradley C. Kuszmaul 2007-11-29 14:18:54 +00:00
parent aea1b4c69d
commit 1a155723d6
56 changed files with 145 additions and 0 deletions

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Insert a bunch of stuff */
#include "brt.h"
#include "key.h"

View file

@ -1,5 +1,7 @@
#ifndef BRT_INTERNAL_H
#define BRT_INTERNAL_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "cachetable.h"
#include "hashtable.h"
#include "pma.h"

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt-internal.h"
#include <fcntl.h>

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#define _XOPEN_SOURCE 500
//#include "pma.h"

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt.h"
#include "key.h"

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Verify a BRT. */
/* Check:
* the fingerprint of every node (local check)

View file

@ -1,4 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Buffered repository tree.
* 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

View file

@ -1,5 +1,7 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ifndef 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
#define _FILE_OFFSET_BITS 64

View file

@ -1,5 +1,8 @@
#ifndef BRTTYPES_H
#define BRTTYPES_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <sys/types.h>
#define _XOPEN_SOURCE 500
#define _FILE_OFFSET_BITS 64

View file

@ -1,4 +1,5 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h>
#include <stdio.h>

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "memory.h"
#include "cachetable.h"

View file

@ -1,3 +1,5 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "cachetable.h"
#include "memory.h"

View file

@ -1,6 +1,8 @@
#ifndef CACHETABLE_H
#define CACHETABLE_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <fcntl.h>
#include "brttypes.h"

View file

@ -1,5 +1,8 @@
#ifndef TOKU_CRC_H
#define TOKU_CRC_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <zlib.h>
// zlib crc32 has a bug: If len==0 then it should return oldcrc32, but crc32 returns 0.

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <arpa/inet.h>
#include <assert.h>
#include "brt-internal.h"

View file

@ -1,3 +1,5 @@
#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.
// See: http://isthe.com/chongo/tech/comp/fnv/
static inline unsigned int hash_key (const unsigned char *key, unsigned long keylen) {

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Hash table with chaining. */
#include "hashtable.h"
#include "memory.h"

View file

@ -1,6 +1,8 @@
#ifndef HASHTABLE_H
#define HASHTABLE_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brttypes.h"
/* Hash table with chaining. */
/* The keys and values are byte sequences. */

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "key.h"
#include "hashtable.h"
#include "memory.h"

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt-internal.h"
#include <sys/types.h>
#include <unistd.h>

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt-internal.h"
#include <assert.h>
#include <string.h>

View file

@ -1,3 +1,5 @@
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "ybt.h"
#include "brttypes.h"

View file

@ -1,6 +1,8 @@
#ifndef KV_PAIR_H
#define KV_PAIR_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "memory.h"
#include <string.h>

View file

@ -1,3 +1,5 @@
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
// This list is intended to be embedded in other data structures.
struct list {
struct list *next, *prev;

View file

@ -1,3 +1,5 @@
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#if defined(__x86_64) || defined(__i386)
static inline void mfence (void) {

View file

@ -1,3 +1,5 @@
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h>
#include <stdio.h>
#include <sys/types.h>

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "log-internal.h"
#include <sys/stat.h>
#include <sys/types.h>

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <arpa/inet.h>
#include <ctype.h>
#include <dirent.h>

View file

@ -1,5 +1,8 @@
#ifndef TOKULOGGGER_H
#define TOKULOGGGER_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "../include/db.h"
#include "brttypes.h"
#include "kv-pair.h"

View file

@ -1,3 +1,6 @@
/* -*- 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 code is used to generate
* The code that writes into the log.
@ -269,6 +272,7 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__u
cf = fopen(codepath, "w"); assert(cf!=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, "#ident \"Copyright (c) 2007 Tokutek Inc. All rights reserved.\"\n");
fprintf(cf, "#include <stdio.h>\n");
fprintf(hf, "#include \"brt-internal.h\"\n");
fprintf(cf, "#include \"log_header.h\"\n");

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "mdict.h"
#include <stdlib.h>
#include <assert.h>

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "mdict.h"
#include "memory.h"
#define USEPMA

View file

@ -1,6 +1,8 @@
#ifndef MDICT_H
#define MDICT_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brttypes.h"
//#define USEPMA

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "memory.h"
#include <assert.h>
#include <string.h>

View file

@ -1,6 +1,8 @@
#ifndef MEMORY_H
#define MEMORY_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
//#include <stdlib.h>
/* Tokutek memory allocation functions and macros.

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <stdio.h>
#include <assert.h>
#include "mempool.h"

View file

@ -1,6 +1,8 @@
#ifndef _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
allocations from the pool. these allocated regions are never recycled.
when the memory pool no longer has free space, the allocated chunks

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "myassert.h"
#include <stdio.h>
#include <stdlib.h>

View file

@ -1,6 +1,8 @@
#ifndef MYASSERT_H
#define MYASSERT_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#ifndef TESTER
#include <assert.h>
#else

View file

@ -1,3 +1,5 @@
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "pma.h"
#include "mempool.h"

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt-internal.h"
#include "key.h"
#include <assert.h>

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* An in-memory Packed Memory Array dictionary.
The keys and values are arrays of bytes, but are not necessarily kept in scan order.
Only the pointers are kept.

View file

@ -1,6 +1,8 @@
#ifndef PMA_H
#define PMA_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brttypes.h"
#include "ybt.h"
#include "yerror.h"

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h>
static int is_prime (int n) {

View file

@ -1,3 +1,5 @@
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Return the smallest prime >= 2^(idx+1)
* Only works for idx<30 */
int toku_get_prime (unsigned int idx);

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Test random insertions using db4 */
#include <assert.h>
#include <db.h>

View file

@ -1,6 +1,8 @@
#ifndef RBUF_H
#define RBUF_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h>
struct rbuf {

View file

@ -1,3 +1,6 @@
/* -*- 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. */
// Test:

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Readers/writers locks implementation
*
*****************************************

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
/* Dump the log from stdin to stdout. */
#include <arpa/inet.h>
#include <assert.h>

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h>
#include <errno.h>
#include <fcntl.h>

View file

@ -1,6 +1,8 @@
#ifndef WBUF_H
#define WBUF_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <assert.h>
#include <string.h>
#include <errno.h>

View file

@ -1,3 +1,6 @@
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#define _FILE_OFFSET_BITS 64
#include "ybt.h"

View file

@ -1,6 +1,8 @@
#ifndef 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.
#include "brttypes.h"
#include "../include/db.h"

View file

@ -1,5 +1,8 @@
#ifndef 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 typ_tag { TYP_BRTNODE = 0xdead0001,