repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
Foxbud/libaermre
include/private/internal/option.h
<reponame>Foxbud/libaermre<filename>include/private/internal/option.h /** * @copyright 2021 the libaermre authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...
LincLiu/TextRotateView
TextRotateViewDemo/TextRotateView/TextRotateView.h
<gh_stars>0 // // TextRotateView.h // TextRotateViewDemo // // Created by dev.liufeng on 2018/6/27. // Copyright © 2018年 dev.liufeng. All rights reserved. // #import <UIKit/UIKit.h> @interface TextRotateView : UICollectionView /** 旋转速度,默认值20 */ @property (nonatomic,assign) CGFloat rotateRate; /** 文本水平间距,默认值 1...
LincLiu/TextRotateView
TextRotateViewDemo/TextRotateView/TextRotateItemCell.h
// // TextRotateItemCell.h // TextRotateViewDemo // // Created by dev.liufeng on 2018/6/27. // Copyright © 2018年 dev.liufeng. All rights reserved. // #import <UIKit/UIKit.h> #import "TextModel.h" @interface TextRotateItemCell : UICollectionViewCell - (void)configWith:(TextModel *)textModel; @end
LincLiu/TextRotateView
TextRotateViewDemo/ViewController.h
<filename>TextRotateViewDemo/ViewController.h // // ViewController.h // TextRotateViewDemo // // Created by dev.liufeng on 2018/6/27. // Copyright © 2018年 dev.liufeng. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
LincLiu/TextRotateView
TextRotateViewDemo/TextRotateView/TextModel.h
<reponame>LincLiu/TextRotateView // // TextModel.h // TextRotateViewDemo // // Created by dev.liufeng on 2018/6/27. // Copyright © 2018年 dev.liufeng. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> @interface TextModel : NSObject /** 文本大小,默认值15 */ @property (nonatomic,assign) ...
erufes/VSS-Simulator
include/Header.h
<gh_stars>1-10 /* The MIT License (MIT) Copyright (c) 2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to...
erufes/VSS-Simulator
include/strategies/ModelStrategy.h
<gh_stars>1-10 /* The MIT License (MIT) Copyright (c) 2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to...
erufes/VSS-Simulator
include/Interfaces/IStateSenderAdapter.h
// // Created by john on 01/09/18. // #ifndef VSS_SIMULATOR_ISTATESENDERADAPTER_H #define VSS_SIMULATOR_ISTATESENDERADAPTER_H class IStateSenderAdapter { public: virtual void send() = 0; }; #endif //VSS_SIMULATOR_ISTATESENDERADAPTER_H
erufes/VSS-Simulator
include/Communications/StateSenderAdapter.h
// // Created by john on 01/09/18. // #ifndef VSS_SIMULATOR_STATESENDERADAPTER_H #define VSS_SIMULATOR_STATESENDERADAPTER_H #include <Interfaces/IStateSenderAdapter.h> #include <Physics.h> #include <Domain/ExecutionConfig.h> #include <Interfaces/IStateSender.h> class StateSenderAdapter : public IStateSenderAdapter {...
erufes/VSS-Simulator
include/Interfaces/ICommandReceiverAdapter.h
// // Created by john on 01/09/18. // #ifndef VSS_SIMULATOR_ICOMMANDRECEIVERADAPTER_H #define VSS_SIMULATOR_ICOMMANDRECEIVERADAPTER_H #include <Domain/TeamType.h> class ICommandReceiverAdapter { public: virtual void loop(vss::TeamType) = 0; }; #endif //VSS_SIMULATOR_ICOMMANDRECEIVERADAPTER_H
erufes/VSS-Simulator
include/Sir.h
<filename>include/Sir.h /* The MIT License (MIT) Copyright (c) 2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rig...
erufes/VSS-Simulator
include/strategies/StrategyBasic.h
<filename>include/strategies/StrategyBasic.h<gh_stars>1-10 /* The MIT License (MIT) Copyright (c) 2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, i...
erufes/VSS-Simulator
include/Interfaces/IControlReceiverAdapter.h
// // Created by johnathan on 07/07/18. // #ifndef VSS_SIMULATOR_ICONTROLRECEIVERADAPTER_H #define VSS_SIMULATOR_ICONTROLRECEIVERADAPTER_H class IControlReceiverAdapter { public: virtual void loop() = 0; }; #endif //VSS_SIMULATOR_ICONTROLRECEIVERADAPTER_H
erufes/VSS-Simulator
include/RobotPhysics.h
/* The MIT License (MIT) Copyright (c) 2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mod...
erufes/VSS-Simulator
include/StartPositionsHelper.h
// // Created by manoel on 04/04/18. // #ifndef VSS_SIMULATOR_INPUTPARSER_HPP #define VSS_SIMULATOR_INPUTPARSER_HPP #include "../include/Header.h" #include <fstream> class StartPositionsHelper { public: static bool parse(string path); static vector<btVector3> positions; static vector<btVector3> angul...
erufes/VSS-Simulator
include/RobotStrategy.h
<gh_stars>1-10 /* The MIT License (MIT) Copyright (c) 2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to...
erufes/VSS-Simulator
include/Simulator.h
/* The MIT License (MIT) Copyright (c) 2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mod...
erufes/VSS-Simulator
include/Helpers/Math.h
// // Created by johnathan on 07/07/18. // #ifndef VSS_SIMULATOR_MATH_H #define VSS_SIMULATOR_MATH_H namespace Math { float radianToDegree(float radian); float degreeToRadian(float degree); }; #endif //VSS_SIMULATOR_MATH_H
erufes/VSS-Simulator
include/Communications/CommandReceiverAdapter.h
// // Created by john on 01/09/18. // #ifndef VSS_SIMULATOR_COMMANDRECEIVERADAPTER_H #define VSS_SIMULATOR_COMMANDRECEIVERADAPTER_H #include <Interfaces/ICommandReceiverAdapter.h> #include <Domain/ExecutionConfig.h> #include <Interfaces/ICommandReceiver.h> #include <Sir.h> class CommandReceiverAdapter : public IComm...
erufes/VSS-Simulator
include/Domain/SimulationConstants.h
/* The MIT License (MIT) Copyright (c) 2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mod...
erufes/VSS-Simulator
include/Arbiter.h
<filename>include/Arbiter.h #ifndef _ARBITER_H_ #define _ARBITER_H_ #include "iostream" #include "Sir.h" #include "Physics.h" using namespace std; //! Classe responsável por verificar ocorrencias como: gol, penalti e falta. Também é responsável por monitorar o tempo e reposicionar os objetos em campo. class Arbiter ...
erufes/VSS-Simulator
include/Communications/ControlReceiverAdapter.h
// // Created by johnathan on 07/07/18. // #ifndef VSS_SIMULATOR_CONTROLRECEIVERADAPTER_H #define VSS_SIMULATOR_CONTROLRECEIVERADAPTER_H #include <Interfaces/IControlReceiver.h> #include <Domain/ExecutionConfig.h> #include <Physics.h> #include <StartPositionsHelper.h> #include "Interfaces/IControlReceiverAdapter.h" ...
pyk/rnorrexp
ziggurat_table_generator.c
/* Ziggurat table generator * This source code is used for generating table integer k, table real w and * table function f of Ziggurat method. This generator will generate both * table for normal distribution and exponential distribution. * * The table is based on the original implementation: * * MARSAGLIA, Geor...
pyk/rnorrexp
ziggurat_table.h
/* Generated by ziggurat_table_generator.c at Tue Aug 30 07:09:51 2016 * DO NOT EDIT THIS FILE! * * Copyright (c) 2016, <NAME>. All rights reserved. * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file. */ #include <stdint.h> #define ZIGGURAT_TABLE_NOR_SIZE 128 #d...
Rmelikyan/collresolve
cambioni2019/collision_classifier.c
<filename>cambioni2019/collision_classifier.c /** * Implementation of the classifier * for the Cambioni et al. (2019) model. * * Copyright (c) 2019 Arizona Board of Regents * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
Rmelikyan/collresolve
collresolve_python.c
/** * The library's interface as a Python module. * * Copyright (c) 2016-2017 University of Bern, Switzerland * Copyright (c) 2018-2019 Arizona Board of Regents * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain...
Rmelikyan/collresolve
cambioni2019/collision_classifier.h
<reponame>Rmelikyan/collresolve<gh_stars>1-10 #ifndef COLLISION_CLASSIFIER_H #define COLLISION_CLASSIFIER_H void collision_classifier( const double X[ 4 ], int* label, double score[ 3 ] ); #endif
Rmelikyan/collresolve
cambioni2019/orbital_hnr.h
<reponame>Rmelikyan/collresolve<gh_stars>1-10 #ifndef ORBITAL_HNR_H #define ORBITAL_HNR_H void orbital_hnr( const double X[ 4 ], double Y[ 3 ] ); #endif
Rmelikyan/collresolve
cambioni2019/accretion_efficiency.h
<reponame>Rmelikyan/collresolve<filename>cambioni2019/accretion_efficiency.h #ifndef ACCRETION_EFFICIENCY_H #define ACCRETION_EFFICIENCY_H void accretion_efficiency( const double X[ 4 ], double Y[ 2 ] ); #endif
Rmelikyan/collresolve
collresolve.h
<reponame>Rmelikyan/collresolve<gh_stars>1-10 /** * The library's public interface in C. * * Copyright (c) 2016-2017 University of Bern, Switzerland * Copyright (c) 2018-2019 Arizona Board of Regents * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complia...
Rmelikyan/collresolve
cambioni2019/accretion_efficiency.c
<gh_stars>1-10 /** * Implementation of the orbital elements Neural Network * for the Cambioni et al. (2019) model. * * Copyright (c) 2019 Arizona Board of Regents * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obta...
Rmelikyan/collresolve
collresolve.c
<gh_stars>1-10 /** * Main implementation of the collresolve library. * * Copyright (c) 2016-2017 University of Bern, Switzerland * Copyright (c) 2018-2019 Arizona Board of Regents * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
Rmelikyan/collresolve
collresolve_for.c
/** * FORTRAN bindings for the collresolve library. * * Copyright (c) 2016-2017 University of Bern, Switzerland * Copyright (c) 2018-2019 Arizona Board of Regents * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obta...
lakid/mt7610u_wifi_sta_v3002_dpo_20130916
include/rtmp.h
<reponame>lakid/mt7610u_wifi_sta_v3002_dpo_20130916 /* ************************************************************************* * Ralink Tech Inc. * 5F., No.36, Taiyuan St., Jhubei City, * Hsinchu County 302, * Taiwan, R.O.C. * * (c) Copyright 2002-2010, Ralink Technology, Inc. * * This program is free softwa...
lakid/mt7610u_wifi_sta_v3002_dpo_20130916
os/linux/rt_main_dev.c
/* ************************************************************************* * Ralink Tech Inc. * 5F., No.36, Taiyuan St., Jhubei City, * Hsinchu County 302, * Taiwan, R.O.C. * * (c) Copyright 2002-2010, Ralink Technology, Inc. * * This program is free software; you can redistribute it and/or modify * * it u...
lakid/mt7610u_wifi_sta_v3002_dpo_20130916
os/linux/cfg80211drv.c
<reponame>lakid/mt7610u_wifi_sta_v3002_dpo_20130916 /* ************************************************************************* * Ralink Tech Inc. * 5F., No.36, Taiyuan St., Jhubei City, * Hsinchu County 302, * Taiwan, R.O.C. * * (c) Copyright 2002-2010, Ralink Technology, Inc. * * This program is free softwa...
lakid/mt7610u_wifi_sta_v3002_dpo_20130916
os/linux/rt_profile.c
<gh_stars>10-100 /* ************************************************************************* * Ralink Tech Inc. * 5F., No.36, Taiyuan St., Jhubei City, * Hsinchu County 302, * Taiwan, R.O.C. * * (c) Copyright 2002-2010, Ralink Technology, Inc. * * This program is free software; you can redistribute it and/or ...
lakid/mt7610u_wifi_sta_v3002_dpo_20130916
common/rtusb_dev_id.c
<gh_stars>10-100 /* ************************************************************************* * Ralink Tech Inc. * 5F., No.36, Taiyuan St., Jhubei City, * Hsinchu County 302, * Taiwan, R.O.C. * * (c) Copyright 2002-2010, Ralink Technology, Inc. * * This program is free software; you can redistribute it and/or ...
zrct0/cpp_speech_features
cpp_speech_features/DiscreteTransform.h
<reponame>zrct0/cpp_speech_features<gh_stars>1-10 #pragma once #include "Vector.h" #define M_PI 3.14159265358979323846 namespace cpp_speech_features { class DiscreteTransform { public: static Matrixp dct(Matrixp data); static Vectorp dctWithOrtho(Vectorp data, accuracy scale); static void rfft(accuracy * x, ...
zrct0/cpp_speech_features
cpp_speech_features/Matrix.h
<gh_stars>1-10 #pragma once #include "AutoGC.h" #define accuracy double #define arrtype accuracy * #define create_arrayp(size, ...) new accuracy[size]{__VA_ARGS__} #define Matrixp Matrix * #define create_matrixp(...) new Matrix( __VA_ARGS__ ) #define Vectorp Vector * #define create_verctorp(...) new Vector( __VA_ARGS_...
zrct0/cpp_speech_features
cpp_speech_features/SpeechFeatures.h
<gh_stars>1-10 #pragma once #include "Vector.h" #define MINIMAL_NUMBER 0.0000000000000002220446049250313 namespace cpp_speech_features { class SpeechFeatures { public: static Matrixp mfcc(Vectorp signal, int samplerate = 16000, accuracy winlen = 0.025, accuracy winstep = 0.01, int numcep = 13, int nfilt = 26, int ...
sakrist/UIDownloadBar
Classes/UIDownloadBarAppDelegate.h
<filename>Classes/UIDownloadBarAppDelegate.h // // UIDownloadBarAppDelegate.h // UIDownloadBar // // Created by SAKrisT on 4/28/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import <UIKit/UIKit.h> #import "UIDownloadBar.h" @interface UIDownloadBarAppDelegate : NSObject <UIApplicationDelegate...
sakrist/UIDownloadBar
Classes/DownloadBar/UIDownloadBar.h
<gh_stars>1-10 // // UIDownloadBar.h // UIDownloadBar // // Created by SAKrisT on 7/8/10. // Copyright 2010 www.developers-life.com. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> @class UIProgressView; @protocol UIDownloadBarDelegate; @interface UIDownloadBar : UIProgressView ...
cococov/rewrite
src/gencode.c
#include "symtab.h" #include "gencode.h" #include <stdio.h> #include <stdlib.h> #include <string.h> int depth; int label_num; void print(char *instr) { fprintf(stdout, "\t%s\n", instr); } void genHeader(char *fname) { fprintf(stdout, ".class public %s\n.super java/lang/Object\n", fname); } int getArraySize(struct Arr...
cococov/rewrite
src/symtab.c
<reponame>cococov/rewrite #include "symtab.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #define DSRPT_MAX 100 struct SymTable SymbolTable; int depth; int global = 0; int par = 0; /* funciones principales */ void openScope() { SymbolTable.scope_num++; depth = SymbolTable.scope_num; if(depth >= DEP_MA...
cococov/rewrite
src/symtab.h
#ifndef __SYMTAB_H___ #define __SYMTAB_H___ #define SYM_MAX 100 #define DEP_MAX 10 #define PAR_MAX 10 enum StdType { TypeInt, TypeReal, TypeChar, TypeBool, TypeArray, TypeFun, TypeProc, TypeNull, TypeLabel, TypeType }; struct SymTableEntry { char name[100]; enum StdType type; int depth; int valid; int d...
cococov/rewrite
src/node.h
<gh_stars>1-10 #ifndef __NODE_H__ #define __NODE_H__ struct nodeType; #define VALUE_INVALID 0 #define VALUE_I_VALID 1 #define VALUE_R_VALID 2 #define NODE_TOKEN 1 #define NODE_OP 2 #define NODE_INT 3 #define NODE_REAL 4 #define NODE_PROGRAM 5 #define NODE_SUBPRO...
cococov/rewrite
src/node.c
<reponame>cococov/rewrite #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include "node.h" struct nodeType* newNode(int type) { struct nodeType *node = (struct nodeType*)malloc(sizeof(struct nodeType)); node->nodeType = type; node->valueValid = VALUE_INVALID; node->string = NULL; node->parent = N...
cococov/rewrite
src/gencode.h
<reponame>cococov/rewrite #ifndef __CODEGEN_H___ #define __CODEGEN_H___ #define MAX 100 #define MAX_SIG 100 #define MAX_LABEL 10 #define MAX_DIM 10 #include "node.h" void genCode(struct nodeType* node, char *fname); #endif
Yulypso/Iris_machine_learning
Initialisation.h
<gh_stars>0 /*informations*/ #define base_de_donnees_tab 0 /*Afficher la base de donnees via tab*/ #define base_de_donnees_liste_iris 1 /*Afficher la base de donnees via liste_iris*/ /*Tableaux*/ float tab[150][5]; /*tableau qui va stocker la base de donnees*/ void recuperation_base_donnees() { FILE* fichier = NULL...
Yulypso/Iris_machine_learning
Entropy.h
double calcul_entropy(double nbsetosa, double nbversicolor, double nbvirginica, double sample) { double sol=0.0; if(nbsetosa==0.0 && nbversicolor==0.0 && nbvirginica==0.0) { sol = 100.0; /*le calcul de l'entropy est impossible. On retourne une valeur improbable positive*/ } /****** On doit tester tous les cas,...
Yulypso/Iris_machine_learning
Headers.h
/*Bibliothèque*/ #include <stdio.h> #include <stdlib.h> #include <math.h> /*Structures*/ typedef struct NODE NODE; typedef struct LISTE LISTE; typedef struct ELEMENT ELEMENT; typedef struct LISTE_IRIS LISTE_IRIS; typedef struct IRIS IRIS; struct NODE { double entropy; /*L'entropy dans le noeud*/ int test; doubl...
Yulypso/Iris_machine_learning
main.c
<filename>main.c /*Pour compiler Kyu : gcc -Wall /Users/Kyu/Desktop/Projet_IRIS_ver_9/main.c -lm -o MAIN*/ /*Pour compiler Diane : gcc -Wall main.c -lm -o main */ /*Bibliothèque*/ #include "Headers.h" /*Il faut rajouter les prototypes au fur à mesure*/ #include "Biblio.h" #include "Initialisation.h" /*Rien à modifier...
Yulypso/Iris_machine_learning
Biblio.h
/* Pour la structure ELEMENT*/ LISTE *init_pile(LISTE *pile) { pile=(LISTE *)malloc(sizeof(LISTE)); pile->premier=NULL; return pile; } int est_vide(LISTE *liste) { int vide; if(liste->premier==NULL) { vide=1; } else { vide=0; } return vide; //vide =1 si la pile es...
ThomasDuverney/Nachos_Project
code/test/de_createthread.c
<reponame>ThomasDuverney/Nachos_Project<gh_stars>0 #include "syscall.h" #define NB 15 /* * Création de plusieurs threads exécutant PutString. * Chacun des threads réalise une boucle de pour effectuer plusieurs PutString */ void g(void *arg) { PutString("Je suis un thread "); PutInt( *((int *) arg) ); ...
ThomasDuverney/Nachos_Project
code/test/GetInt_PutInt_0.c
#include "syscall.h" /* Lecture d'un entier depuis l'entrée standard. Ecriture de cet entier sur la sortie standard. */ int main(){ int i; GetInt(&i); PutInt(i); return 0; }
ThomasDuverney/Nachos_Project
code/test/UserThreadCreate_0.c
#include "syscall.h" #define NB 5 /* Creation de plusieurs threads utilisateur qui affichent un entier. */ void g(void *arg) { int n = *(int*) arg; //PutString("Je suis le thread num "); PutInt(n); PutChar('\n'); UserThreadExit(); } int main(){ int tab[NB]; int i; for(i=0; i<NB; i++){ tab[i] = i; Us...
ThomasDuverney/Nachos_Project
code/test/shell.c
<gh_stars>0 #include "syscall.h" #define DEBUG 0 #define NBMAXARGS 8 #define MAXLENGTHCMD 40 #define MAX_SIZE 100 int strcmp(char *s1, char *s2){ int i = 0; while(s1[i] != '\0' && s1[i] != '\n' ){ if(s1[i] != s2[i]){ return 0; // les chaines ne sont pas les memes } i++; ...
ThomasDuverney/Nachos_Project
code/userprog/frameprovider.h
<reponame>ThomasDuverney/Nachos_Project<gh_stars>0 #ifndef FRAMEPROVIDER_H #define FRAMEPROVIDER_H #include "bitmap.h" /* Classe pour l'allocation de cadres de pages pour les piles des threads utilisateurs. On maintient dans le FrameProvider une bitmap décrivant les cadres de pages libres en mémoire physique. */ ...
ThomasDuverney/Nachos_Project
code/test/MultiThreadPutInt_Sem_0.c
<reponame>ThomasDuverney/Nachos_Project #include "syscall.h" #define NB 5 /* * Création de plusieurs threads exécutant putInt. * On vérifie le bon fonctionnement des structures de synchronisation par * l'utilisation concurrente de synchconsole */ unsigned int sem; void g(void *arg) { SemWait(sem); int i = 0...
ThomasDuverney/Nachos_Project
code/userprog/usernetwork.h
<gh_stars>0 #include "system.h" extern void do_UserSendMessage(); extern void do_UserReceiveMessage();
ThomasDuverney/Nachos_Project
code/userprog/usersynchro.h
<gh_stars>0 extern void do_UserMutexCreate(); extern void do_UserMutexLock(); extern void do_UserMutexUnlock(); extern void do_UserMutexDestroy(); //////////////////////////////////////////////////////// // Gestion des Sémaphores utilisateur // // // ...
ThomasDuverney/Nachos_Project
code/test/atoi.c
#include "syscall.h" int atoi(char * str){ int res = 0; // Initialisation du résultat int sign = 1; // Initialisation du flag signe comme positif int i = 0; /* Si le première caractère de la chaine est "-" alors le nombre est négatif */ if (str[0] == '-') { sign = -1; i++; } /*...
ThomasDuverney/Nachos_Project
code/test/ForkExec_Multithread_1.c
<gh_stars>0 #include "syscall.h" #define NB 5 unsigned int mutex; int main(){ mutex = MutexCreate(); PutString("MainDebut_0\n"); ForkExec("ForkExec_Multithread_0"); PutString("MainFin_0\n"); MutexDestroy(mutex); return(0); }
ThomasDuverney/Nachos_Project
code/test/ForkExec_2.c
#include "syscall.h" int main(){ PutString("MainDebut"); ForkExec("ForkExec_0"); PutString("MainFin"); Exit(0); }
ThomasDuverney/Nachos_Project
code/test/MultiThreadGetString_Mutex_0.c
#include "syscall.h" #define NB 5 /* * Création de plusieurs threads exécutant getString puis PutString. * On vérifie le bon fonctionnement des structures de synchronisation par * l'utilisation concurrente de synchconsole */ unsigned int mutex; void g(void *arg) { MutexLock(mutex); char s[10]; int i; fo...
ThomasDuverney/Nachos_Project
code/test/getInt.c
<gh_stars>0 #include "syscall.h" int main(){ int i; GetInt(&i); return 0; }
ThomasDuverney/Nachos_Project
code/test/PutString_1.c
#include "syscall.h" /* Affichage de deux chaines de caractères sur la sortie standard. */ int main() { PutString("ABCDEFGH"); PutString("ijklmnopqrstuvwxyz"); return(0); }
ThomasDuverney/Nachos_Project
code/userprog/userfilesys.h
<reponame>ThomasDuverney/Nachos_Project #include "system.h" extern void do_UserCreateDirectory(); extern void do_UserChangeDirectoryPath(); extern void do_UserListDirectory(); extern void do_UserRemove(); extern void do_UserCreate(); extern void do_UserOpen(); extern void do_UserClose(); extern void do_UserRead(); ext...
ThomasDuverney/Nachos_Project
code/userprog/synchconsole.h
<filename>code/userprog/synchconsole.h #ifndef SYNCHCONSOLE_H #define SYNCHCONSOLE_H #include "copyright.h" #include "utility.h" #include "console.h" #include "synch.h" class SynchConsole { public: SynchConsole(char *readFile, char *writeFile); // initialize the hardware console device ~SynchCons...
ThomasDuverney/Nachos_Project
code/userprog/userprocess.h
<reponame>ThomasDuverney/Nachos_Project<gh_stars>0 #include "thread.h" #include "system.h" extern int do_UserProcessCreate(); extern void do_UserProcessFinish(Thread *t);
ThomasDuverney/Nachos_Project
code/test/UserThreadJoin_0.c
#include "syscall.h" /* Creation de plusieurs threads utilisateur qui affichent un entier. */ void g(void *arg) { PutString("Debut fonction g\n"); PutString("Blabla\n"); PutString("Blabla\n"); PutString("Blabla\n"); PutString("Blabla\n"); UserThreadExit(); } int main(){ PutString("Debut main\n"); int ar...
ThomasDuverney/Nachos_Project
code/userprog/userthread.h
/* * Structure pour le passage d'une fonction et ses paramètres lors de la création * d'un thread utilisateur. */ typedef struct _userThreadParams { int f; int arg; int addrExit; }UserThreadParams; /* * Specification: int do_UserThreadCreate(int f, int arg) * Prends en paramètres l'adresse d'une fonction ...
ThomasDuverney/Nachos_Project
code/test/ForkExec_3.c
#include "syscall.h" int main(){ PutString(" *Début du processus forkExec_3*\n"); ForkExec("MultiThreadPutInt_Mutex_0"); PutString(" *Fin du processus forkExec_3*\n"); Exit(0); }
ThomasDuverney/Nachos_Project
code/test/UserThreadCreate_1.c
#include "syscall.h" #define NB 10 /* * Creation de plusieurs threads utilisateur qui affichent des caractères. * Le thread 1 doit afficher 'X' et le caractère 'a' passé en paramètre de UserThreadCreate. * Le thread 2 doit afficher 'Y' et 'b' passé en paramètre de UserThreadCreate. * Bug: * Le thread 1 affiche '...
ThomasDuverney/Nachos_Project
code/test/de_forkexecmultip.c
<gh_stars>0 #include "syscall.h" int calculSomme(){ int i =0; int somme = 0; for(;i<10;i++){ somme += i; } return somme; } int main(){ PutString("Debut du processus de_forkexecmultip \n"); ForkExec("ForkExec_1"); PutString("Fin du processus de_forkexecmultip \n"); Exit(0); }
ThomasDuverney/Nachos_Project
code/test/PutChar_0.c
#include "syscall.h" /* Ecriture d'un caractère sur la sortie standard. */ int main() { PutChar('z'); return(0); }
ThomasDuverney/Nachos_Project
code/test/chat.c
#include "syscall.h" #define STOP 0 #define IDLE 1 struct threadParam{ int boxFrom; char* otherName; }; struct threadParam p; void reception(void *arg) { char buf[100]; int box = p.boxFrom; while(1){ ReceiveMessage(buf, box); PutString(buf); PutString("\nEntrez le message ...
ThomasDuverney/Nachos_Project
code/test/MultiThreadShowUniqueTid_0.c
<reponame>ThomasDuverney/Nachos_Project #include "syscall.h" #define NB 5 /* * Programme de test créant plusieurs threads executant affichant leur TID avec un PuInt. * On vérifie que le système donne un identifiant unique à chacun des threads créés */ void g(void *arg) { UserThreadExit(); } int main(){ int ...
ThomasDuverney/Nachos_Project
code/test/PutString_2.c
<filename>code/test/PutString_2.c #include "syscall.h" /* Affichage d'une chaine de taille suppérieure à la constante MAX_STRING_SIZE(=100) définie dans system.h. */ int main() { int t = 100; int depassement = 10; char string[t+depassement]; int i; /* Remplissage du buffer */ for(i=0; i<t; ...
ThomasDuverney/Nachos_Project
code/test/Foxk_exec_appelle.c
#include "syscall.h" int main(){ PutString("Nouveau process"); ForkExec("PutString_0"); return(0); }
ThomasDuverney/Nachos_Project
code/test/de_IO.c
#include "syscall.h" int main(){ int i; char c; char chaine[30]; PutString("Rentrer une chaine\n"); GetString(chaine,30); PutString("La chaine saisie est : "); PutString(chaine); PutString("\n"); PutString("Rentrer un entier\n"); GetInt(&i); PutString("L'entier saisi est : "); PutInt(i); PutS...
ThomasDuverney/Nachos_Project
code/test/GetInt_0.c
<filename>code/test/GetInt_0.c #include "syscall.h" /* Lecture d'un entier depuis l'entrée standard. */ int main(){ int i; GetInt(&i); return 0; }
ThomasDuverney/Nachos_Project
code/userprog/syscall.h
/* syscalls.h * Nachos system call interface. These are Nachos kernel operations * that can be invoked from user programs, by trapping to the kernel * via the "syscall" instruction. * * This file is included by user programs and by the Nachos kernel. * * Copyright (c) 1992-1993 The Regents of the University o...
ThomasDuverney/Nachos_Project
code/userprog/userconsole.h
<reponame>ThomasDuverney/Nachos_Project #include "system.h" void do_UserPutChar(); void do_UserPutString(); void do_UserPutInt(); void do_UserGetChar(); void do_UserGetString(); void do_UserGetInt();
ThomasDuverney/Nachos_Project
code/test/makethreads.c
<gh_stars>0 #include "syscall.h" void f(void *arg) { PutString("f le print a="); PutInt(*(int*)arg); PutChar('\n'); UserThreadExit(); } void g(void *arg) { PutString("g le print a=1\n"); PutString("g le print a=2\n"); PutString("g le print a=3\n"); PutString("g le print a=4\n"); P...
ThomasDuverney/Nachos_Project
code/test/PutInt_0.c
#include "syscall.h" /* Ecriture d'un entier sur la sortie standart */ int main(){ PutInt(10); Exit(0); }
ThomasDuverney/Nachos_Project
code/test/MultiThreadGetChar_0.c
#include "syscall.h" #define NB 5 /* * Création de plusieurs threads exécutant GetChar puis Putchar. * On vérifie le bon fonctionnement des structures de synchronisation par * l'utilisation concurrente de synchconsole * Remarque: * A l'exécution, lorsqu'un thread lit un caractère sur l'entrée standard, le * car...
ThomasDuverney/Nachos_Project
code/test/getstring.c
<filename>code/test/getstring.c #include "syscall.h" int main(){ char s[20]; // bloquant GetString(s, 20); PutString(s); PutString("\n"); return 0; }
ThomasDuverney/Nachos_Project
code/test/userpages0.c
#include "syscall.h" void characterInterleaved1(void *arg) { int i; for(i=0; i<5; i++){ PutString("Thread 1: "); PutInt(i); PutChar('\n'); } UserThreadExit(); } void characterInterleaved2(void *arg) { int i; for(i=0; i<5; i++){ PutString("Thread 2: "); PutInt(i); PutChar('\n'); }...
ThomasDuverney/Nachos_Project
code/test/ForkExec_Multithread_0.c
<reponame>ThomasDuverney/Nachos_Project<filename>code/test/ForkExec_Multithread_0.c<gh_stars>0 #include "syscall.h" int main(){ PutString("DebutMain\n"); ForkExec("MultiThreadPutInt_Mutex_0"); PutString("FinMain\n"); Exit(0); }
ThomasDuverney/Nachos_Project
code/test/UserThreadJoin_1.c
#include "syscall.h" /* Creation de plusieurs threads utilisateur qui affichent un entier. */ void g(void *arg) { int n = *(int*) arg; PutString("Debut fonction g"); PutInt(n); PutString("\nBlabla\n"); PutString("Blabla\n"); PutString("Blabla\n"); PutString("Blabla\n"); UserThreadExit(); } int main(){ ...
ThomasDuverney/Nachos_Project
code/threads/system.h
// system.h // All global variables used in Nachos are defined here. // // Copyright (c) 1992-1993 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions. #ifndef SYSTEM_H #define SYSTEM_H #in...
ThomasDuverney/Nachos_Project
code/test/PutChar_1.c
<reponame>ThomasDuverney/Nachos_Project<gh_stars>0 #include "syscall.h" /* Ecriture de plusieurs caractères sur la sortie standard. */ int main() { PutChar('a'); PutChar('b'); return(0); }
ThomasDuverney/Nachos_Project
code/test/getchar.c
<reponame>ThomasDuverney/Nachos_Project #include "syscall.h" int main() { char c = GetChar(); PutChar('|'); PutChar(c); PutChar('|'); PutInt((int)c); PutChar('\n'); return(14); }
ThomasDuverney/Nachos_Project
code/test/ForkExec_0.c
#include "syscall.h" int main(){ PutInt(555); ForkExec("PutInt_0"); PutInt(666); Exit(0); }
ThomasDuverney/Nachos_Project
code/test/MultiThreadPutString_0.c
#include "syscall.h" #define NB 15 /* * Création de plusieurs threads exécutant PutString. * On vérifie le bon fonctionnement des structures de synchronisation par * l'utilisation concurrente de synchconsole */ void g(void *arg) { PutString("Je suis un thread\n"); UserThreadExit(); } int main(){ int tab[...
ThomasDuverney/Nachos_Project
code/test/FileSysAllFunctionTest.c
<gh_stars>0 #include "syscall.h" int main(){ CreateDirectory("dossier_temp"); ChangeDirectoryPath("dossier_temp"); ListDirectory("."); ChangeDirectoryPath(".."); Remove("dossier_temp"); ListDirectory("."); return 0; }
ThomasDuverney/Nachos_Project
code/test/de_LecteurRedacteurs.c
<gh_stars>0 #include "syscall.h" #define NB_ITERATIONS 3; #define NB_LECTEURS 3; #define NB_REDACTEURS 3; int nbLs; int nbLa; int enEcriture; int donnee = 0; Cond_t fileL; Cond_t fileR; Mutex_t mutex; void debut_redaction() { MutexLock(mutex); while(enEcriture || nbLa> 0) { CondWait(fileR, mutex); } enEc...
ThomasDuverney/Nachos_Project
code/threads/bool.h
// Defining TRUE and FALSE is usually a Bad Idea, // because you will probably be inconsistent with anyone // else who had the same clever idea. // Therefore: DON'T USE THIS FILE. #ifndef _bool_h #define _bool_h 1 // 'true' and 'false' are c++ keywords. #undef TRUE #undef FALSE #define TRUE true #define FALSE false ...