This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- oldsrc/drivers/memory/memory.c 2009-10-22 18:26:49.251667100 +1300 | |
| +++ src/drivers/memory/memory.c 2009-10-22 18:34:50.203175900 +1300 | |
| @@ -10,99 +10,104 @@ | |
| * Changes: | |
| * Apr 29, 2005 added null byte generator (Jorrit N. Herder) | |
| * Apr 09, 2005 added support for boot device (Jorrit N. Herder) | |
| * Jul 26, 2004 moved RAM driver to user-space (Jorrit N. Herder) | |
| * Apr 20, 1992 device dependent/independent split (Kees J. Bot) | |
| */ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "../drivers.h" | |
| #include "../libdriver/driver.h" | |
| #include "proc.h" | |
| extern int errno; /* error number for PM calls */ | |
| PRIVATE int p_device; /* current device */ | |
| FORWARD _PROTOTYPE( char *p_name, (void) ); | |
| FORWARD _PROTOTYPE( struct device *p_prepare, (int device) ); | |
| FORWARD _PROTOTYPE( int p_transfer, (int proc_nr, int opcode, u64_t position, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Prototypes for functions called upon a read to a /proc file | |
| These functions all fill the buffer parameter with a string, | |
| which is returned to the process calling read() */ | |
| #define NR_DEVS 6 /* number of minor devices */ | |
| _PROTOTYPE( void get_uptime, (char *buffer, int bufSize) ); | |
| _PROTOTYPE( void get_Hz, (char *buffer, int bufSize) ); | |
| _PROTOTYPE( void get_bootenv, (char *buffer, int bufSize) ); | |
| _PROTOTYPE( void get_cpuinfo, (char *buffer, int bufSize) ); | |
| _PROTOTYPE( void get_processes, (char *buffer, int bufSize) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- oldsrc/drivers/memory/Makefile 2009-10-22 18:26:50.019711000 +1300 | |
| +++ src/drivers/proc/Makefile 2009-10-22 18:07:41.427015300 +1300 | |
| @@ -1,58 +1,37 @@ | |
| -# Makefile for memory driver (MEMORY) | |
| -DRIVER = memory | |
| +# Makefile for proc driver (PROC) | |
| +DRIVER = proc | |
| # directories | |
| u = /usr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- oldsrc/kernel/table.c 2009-10-22 18:23:54.714684100 +1300 | |
| +++ src/kernel/table.c 2009-10-22 18:00:38.046799300 +1300 | |
| @@ -81,61 +81,63 @@ | |
| #define FS_C SYS_KILL, SYS_VIRCOPY, SYS_SAFECOPYFROM, SYS_SAFECOPYTO, \ | |
| SYS_VIRVCOPY, SYS_UMAP, SYS_GETINFO, SYS_EXIT, SYS_TIMES, SYS_SETALARM, \ | |
| SYS_PRIVCTL, SYS_TRACE , SYS_SETGRANT, SYS_PROFBUF, SYS_SYSCTL | |
| #define DRV_C FS_C, SYS_SEGCTL, SYS_IRQCTL, SYS_INT86, SYS_DEVIO, \ | |
| SYS_SDEVIO, SYS_VDEVIO, SYS_SETGRANT, SYS_PROFBUF, SYS_SYSCTL | |
| PRIVATE int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- oldsrc/drivers/Makefile 2009-10-22 18:27:02.874446200 +1300 | |
| +++ src/drivers/Makefile 2009-10-22 18:07:42.490076100 +1300 | |
| @@ -9,42 +9,44 @@ | |
| @echo " make build # Compile all device drivers locally" >&2 | |
| @echo " make image # Compile drivers in boot image" >&2 | |
| @echo " make clean # Remove local compiler results" >&2 | |
| @echo " make install # Install drivers to /etc/drivers/" >&2 | |
| @echo " (requires root privileges)" >&2 | |
| @echo "" >&2 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "../drivers.h" | |
| PUBLIC void get_bootenv(char *buf, int bufSize) { | |
| int status; | |
| char *char_p; | |
| status = sys_getmonparams(buf, bufSize); | |
| if (status != OK) printf("PROC: sys_getmonparams failed: %d", status); | |
| /* Convert nulls between params into new lines */ | |
| char_p = buf; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace ConsoleApplication1 | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| } | |
| } | |
| abstract class AbstractBar {} | |
| class ConcreteBar : AbstractBar {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public int multiply(int a, int b) { | |
| } | |
| public int divide(int numerator, int denominator) { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Forked from Noah Sloan's simple http server at http://gist.github.com/246761 |