mirror of
https://github.com/drasko/codezero.git
synced 2026-03-02 02:33:12 +01:00
libl4thread skeleton is introduced.
With this library, it is aimed at easing thread manipulation, utcb handling etc.
This commit is contained in:
@@ -44,9 +44,13 @@ libmm, libmc, libmalloc = SConscript('conts/libmem/SConscript', \
|
|||||||
duplicate = 0, variant_dir = \
|
duplicate = 0, variant_dir = \
|
||||||
join(BUILDDIR, os.path.relpath('conts/libmem', PROJROOT)))
|
join(BUILDDIR, os.path.relpath('conts/libmem', PROJROOT)))
|
||||||
|
|
||||||
|
libl4thread = SConscript('conts/libl4thread/SConscript', \
|
||||||
|
exports = { 'env' : env }, duplicate = 0, \
|
||||||
|
variant_dir = join(BUILDDIR, os.path.relpath('conts/libl4thread', PROJROOT)))
|
||||||
|
|
||||||
Alias('libl4', libl4)
|
Alias('libl4', libl4)
|
||||||
Alias('libc', libc)
|
Alias('libc', libc)
|
||||||
Alias('libmm', libmm)
|
Alias('libmm', libmm)
|
||||||
Alias('libmc', libmc)
|
Alias('libmc', libmc)
|
||||||
Alias('libmalloc', libmalloc)
|
Alias('libmalloc', libmalloc)
|
||||||
|
Alias('libl4thread', libl4thread)
|
||||||
|
|||||||
25
conts/libl4thread/SConscript
Normal file
25
conts/libl4thread/SConscript
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# -*- mode: python; coding: utf-8; -*-
|
||||||
|
#
|
||||||
|
# Codezero -- Virtualization microkernel for embedded systems.
|
||||||
|
#
|
||||||
|
# Copyright © 2009 B Labs Ltd
|
||||||
|
|
||||||
|
import os, sys
|
||||||
|
|
||||||
|
# Get global paths
|
||||||
|
PROJRELROOT = '../..'
|
||||||
|
|
||||||
|
sys.path.append(PROJRELROOT)
|
||||||
|
|
||||||
|
from config.projpaths import *
|
||||||
|
|
||||||
|
Import('env')
|
||||||
|
|
||||||
|
e = env.Clone()
|
||||||
|
e.Append(CPPPATH = ['include/l4thread'])
|
||||||
|
|
||||||
|
source = [Glob('*.[cS]') + Glob('src/*.[cS]')]
|
||||||
|
objects = e.StaticObject(source)
|
||||||
|
library = e.StaticLibrary('l4thread', objects)
|
||||||
|
|
||||||
|
Return('library')
|
||||||
9
conts/libl4thread/include/l4thread/thread.h
Normal file
9
conts/libl4thread/include/l4thread/thread.h
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef __LIB_THREAD_H__
|
||||||
|
#define __LIB_THREAD_H__
|
||||||
|
|
||||||
|
void l4thread_print(void);
|
||||||
|
|
||||||
|
#endif /* __LIB_THREAD_H__ */
|
||||||
10
conts/libl4thread/src/thread.c
Normal file
10
conts/libl4thread/src/thread.c
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void l4thread_print(void)
|
||||||
|
{
|
||||||
|
printf("Hello world from libl4thread!\n");
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user