Skip to content

Commit

Permalink
License cleanup, ifdef namespace cleanup
Browse files Browse the repository at this point in the history
- Spell out the LGPL license completely in each file.
- Change LINUX_* ifdefs for LIB_* in lib/ringbuffer header.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  • Loading branch information
compudj committed Mar 9, 2012
1 parent bbda3a0 commit 886d51a
Show file tree
Hide file tree
Showing 85 changed files with 1,360 additions and 289 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
/*
* lttng-syscalls-extractor.c
*
* Dump syscall metadata to console.
*
* Copyright 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* Copyright 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
*
* Dump syscall metadata to console.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* GPLv2 license.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include <linux/module.h>
Expand Down
16 changes: 14 additions & 2 deletions lib/align.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@
/*
* lib/align.h
*
* (C) Copyright 2010-2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Dual LGPL v2.1/GPL v2 license.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifdef __KERNEL__
Expand Down
16 changes: 14 additions & 2 deletions lib/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@
/*
* lib/bug.h
*
* (C) Copyright 2010-2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Dual LGPL v2.1/GPL v2 license.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

/**
Expand Down
26 changes: 19 additions & 7 deletions lib/ringbuffer/api.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#ifndef _LINUX_RING_BUFFER_API_H
#define _LINUX_RING_BUFFER_API_H
#ifndef _LIB_RING_BUFFER_API_H
#define _LIB_RING_BUFFER_API_H

/*
* linux/ringbuffer/api.h
*
* Copyright (C) 2010 - Mathieu Desnoyers "mathieu.desnoyers@efficios.com"
* lib/ringbuffer/api.h
*
* Ring Buffer API.
*
* Dual LGPL v2.1/GPL v2 license.
* Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "../../wrapper/ringbuffer/backend.h"
Expand All @@ -22,4 +34,4 @@
*/
#include "../../wrapper/ringbuffer/frontend_api.h"

#endif /* _LINUX_RING_BUFFER_API_H */
#endif /* _LIB_RING_BUFFER_API_H */
26 changes: 19 additions & 7 deletions lib/ringbuffer/backend.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#ifndef _LINUX_RING_BUFFER_BACKEND_H
#define _LINUX_RING_BUFFER_BACKEND_H
#ifndef _LIB_RING_BUFFER_BACKEND_H
#define _LIB_RING_BUFFER_BACKEND_H

/*
* linux/ringbuffer/backend.h
*
* Copyright (C) 2008-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* lib/ringbuffer/backend.h
*
* Ring buffer backend (API).
*
* Dual LGPL v2.1/GPL v2 license.
* Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Credits to Steven Rostedt for proposing to use an extra-subbuffer owned by
* the reader in flight recorder mode.
Expand Down Expand Up @@ -247,4 +259,4 @@ ssize_t lib_ring_buffer_file_splice_read(struct file *in, loff_t *ppos,
size_t len, unsigned int flags);
loff_t lib_ring_buffer_no_llseek(struct file *file, loff_t offset, int origin);

#endif /* _LINUX_RING_BUFFER_BACKEND_H */
#endif /* _LIB_RING_BUFFER_BACKEND_H */
26 changes: 19 additions & 7 deletions lib/ringbuffer/backend_internal.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#ifndef _LINUX_RING_BUFFER_BACKEND_INTERNAL_H
#define _LINUX_RING_BUFFER_BACKEND_INTERNAL_H
#ifndef _LIB_RING_BUFFER_BACKEND_INTERNAL_H
#define _LIB_RING_BUFFER_BACKEND_INTERNAL_H

/*
* linux/ringbuffer/backend_internal.h
*
* Copyright (C) 2008-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* lib/ringbuffer/backend_internal.h
*
* Ring buffer backend (internal helpers).
*
* Dual LGPL v2.1/GPL v2 license.
* Copyright (C) 2008-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "../../wrapper/ringbuffer/config.h"
Expand Down Expand Up @@ -446,4 +458,4 @@ void lib_ring_buffer_do_memset(char *dest, int c,
dest[i] = c;
}

#endif /* _LINUX_RING_BUFFER_BACKEND_INTERNAL_H */
#endif /* _LIB_RING_BUFFER_BACKEND_INTERNAL_H */
26 changes: 19 additions & 7 deletions lib/ringbuffer/backend_types.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#ifndef _LINUX_RING_BUFFER_BACKEND_TYPES_H
#define _LINUX_RING_BUFFER_BACKEND_TYPES_H
#ifndef _LIB_RING_BUFFER_BACKEND_TYPES_H
#define _LIB_RING_BUFFER_BACKEND_TYPES_H

/*
* linux/ringbuffer/backend_types.h
*
* Copyright (C) 2008-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* lib/ringbuffer/backend_types.h
*
* Ring buffer backend (types).
*
* Dual LGPL v2.1/GPL v2 license.
* Copyright (C) 2008-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <linux/cpumask.h>
Expand Down Expand Up @@ -82,4 +94,4 @@ struct channel_backend {
char name[NAME_MAX]; /* Channel name */
};

#endif /* _LINUX_RING_BUFFER_BACKEND_TYPES_H */
#endif /* _LIB_RING_BUFFER_BACKEND_TYPES_H */
26 changes: 19 additions & 7 deletions lib/ringbuffer/config.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
#ifndef _LINUX_RING_BUFFER_CONFIG_H
#define _LINUX_RING_BUFFER_CONFIG_H
#ifndef _LIB_RING_BUFFER_CONFIG_H
#define _LIB_RING_BUFFER_CONFIG_H

/*
* linux/ringbuffer/config.h
*
* Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* lib/ringbuffer/config.h
*
* Ring buffer configuration header. Note: after declaring the standard inline
* functions, clients should also include linux/ringbuffer/api.h.
*
* Dual LGPL v2.1/GPL v2 license.
* Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <linux/types.h>
Expand Down Expand Up @@ -295,4 +307,4 @@ int lib_ring_buffer_check_config(const struct lib_ring_buffer_config *config,

#include "../../wrapper/ringbuffer/vatomic.h"

#endif /* _LINUX_RING_BUFFER_CONFIG_H */
#endif /* _LIB_RING_BUFFER_CONFIG_H */
28 changes: 20 additions & 8 deletions lib/ringbuffer/frontend.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
#ifndef _LINUX_RING_BUFFER_FRONTEND_H
#define _LINUX_RING_BUFFER_FRONTEND_H
#ifndef _LIB_RING_BUFFER_FRONTEND_H
#define _LIB_RING_BUFFER_FRONTEND_H

/*
* linux/ringbuffer/frontend.h
*
* (C) Copyright 2005-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* lib/ringbuffer/frontend.h
*
* Ring Buffer Library Synchronization Header (API).
*
* Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* See ring_buffer_frontend.c for more information on wait-free algorithms.
*
* Dual LGPL v2.1/GPL v2 license.
*/

#include <linux/pipe_fs_i.h>
Expand Down Expand Up @@ -225,4 +237,4 @@ unsigned long lib_ring_buffer_get_records_read(
return v_read(config, &buf->backend.records_read);
}

#endif /* _LINUX_RING_BUFFER_FRONTEND_H */
#endif /* _LIB_RING_BUFFER_FRONTEND_H */
28 changes: 20 additions & 8 deletions lib/ringbuffer/frontend_api.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
#ifndef _LINUX_RING_BUFFER_FRONTEND_API_H
#define _LINUX_RING_BUFFER_FRONTEND_API_H
#ifndef _LIB_RING_BUFFER_FRONTEND_API_H
#define _LIB_RING_BUFFER_FRONTEND_API_H

/*
* linux/ringbuffer/frontend_api.h
*
* (C) Copyright 2005-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* lib/ringbuffer/frontend_api.h
*
* Ring Buffer Library Synchronization Header (buffer write API).
*
* Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* See ring_buffer_frontend.c for more information on wait-free algorithms.
* See linux/ringbuffer/frontend.h for channel allocation and read-side API.
*
* Dual LGPL v2.1/GPL v2 license.
*/

#include "../../wrapper/ringbuffer/frontend.h"
Expand Down Expand Up @@ -355,4 +367,4 @@ void lib_ring_buffer_record_enable(const struct lib_ring_buffer_config *config,
atomic_dec(&buf->record_disabled);
}

#endif /* _LINUX_RING_BUFFER_FRONTEND_API_H */
#endif /* _LIB_RING_BUFFER_FRONTEND_API_H */
Loading

0 comments on commit 886d51a

Please sign in to comment.