~ubuntu-core-dev/module-init-tools/ubuntu

« back to all changes in this revision

Viewing changes to tests/data/src/loop1.c

  • Committer: Scott James Remnant
  • Date: 2009-07-16 15:24:17 UTC
  • mfrom: (152.1.38)
  • Revision ID: scott@netsplit.com-20090716152417-7ak1sklxb59cs4fz
MergeĀ 3.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Part of a simple module loop */
 
2
#include "module.h"
 
3
 
2
4
extern int from_loop2;
3
5
 
4
 
#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
5
 
struct kernel_symbol
6
 
{
7
 
        unsigned long value;
8
 
        char name[MODULE_NAME_LEN];
9
 
};
10
 
 
11
 
#define EXPORT_SYMBOL(sym)                              \
12
 
        const struct kernel_symbol __ksymtab_##sym      \
13
 
        __attribute__((section("__ksymtab")))           \
14
 
        = { (unsigned long)&sym, #sym }
15
 
 
16
6
int from_loop1;
17
7
 
18
8
EXPORT_SYMBOL(from_loop1);