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

« back to all changes in this revision

Viewing changes to tests/data/src/export_dep.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
/* A module exporting a symbol, and requiring a symbol */
2
 
#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
3
 
struct kernel_symbol
4
 
{
5
 
        unsigned long value;
6
 
        char name[MODULE_NAME_LEN];
7
 
};
8
 
 
9
 
#define EXPORT_SYMBOL(sym)                              \
10
 
        const struct kernel_symbol __ksymtab_##sym      \
11
 
        __attribute__((section("__ksymtab")))           \
12
 
        = { (unsigned long)&sym, #sym }
 
2
#include "module.h"
13
3
 
14
4
extern int exported1;
15
5
int exported3;