since the delay is specified in microseconds, rename the aml delay function to "amlmicrodelay" to prevent confusion. also, make sure aml(2) declares all its functions. Reference: /n/atom/patch/applied2013/amlmicrodelay Date: Sat Oct 5 20:02:03 CES 2013 Signed-off-by: quanstro@quanstro.net # rm /sys/src/libaml/amldelay.c --- /sys/src/libaml/mkfile Sat Oct 5 20:01:19 2013 +++ /sys/src/libaml/mkfile Sat Oct 5 20:01:19 2013 @@ -6,7 +6,7 @@ amlmapio.$O\ amlunmapio.$O\ amlalloc.$O\ - amldelay.$O\ + amlmicrodelay.$O\ HFILES=/sys/include/aml.h --- /sys/src/libaml/amlmicrodelay.c Thu Jan 1 00:00:00 1970 +++ /sys/src/libaml/amlmicrodelay.c Sat Oct 5 20:01:20 2013 @@ -0,0 +1,8 @@ +#include +#include +#include + +void +amlmicrodelay(int) +{ +} --- /sys/src/libaml/aml.c Sat Oct 5 20:01:22 2013 +++ /sys/src/libaml/aml.c Sat Oct 5 20:01:24 2013 @@ -1807,14 +1807,14 @@ static void* evalstall(void) { - amldelay(ival(FP->arg[0])); + amlmicrodelay(ival(FP->arg[0])); return nil; } static void* evalsleep(void) { - amldelay(ival(FP->arg[0])*1000); + amlmicrodelay(ival(FP->arg[0])*1000); return nil; } --- /sys/include/aml.h Sat Oct 5 20:01:25 2013 +++ /sys/include/aml.h Sat Oct 5 20:01:26 2013 @@ -43,7 +43,7 @@ extern void* amlalloc(usize); extern void amlfree(void*); -extern void amldelay(int); /* microseconds */ +extern void amlmicrodelay(int); enum { MemSpace = 0x00, --- /sys/src/nix/k10/acpiio.c Sat Oct 5 20:01:27 2013 +++ /sys/src/nix/k10/acpiio.c Sat Oct 5 20:01:27 2013 @@ -252,7 +252,7 @@ } void -amldelay(int µs) +amlmicrodelay(int µs) { microdelay(µs); } --- /sys/man/2/aml Sat Oct 5 20:01:28 2013 +++ /sys/man/2/aml Sat Oct 5 20:01:29 2013 @@ -1,6 +1,6 @@ .TH AML 2 .SH NAME -amltag, amlval, amlint, amllen, amlinit, amlexit, amlload, amlwalk, amleval, amlenum, amlalloc, amlfree \- ACPI interprter +amlalloc, amldrop, amlenum, amleval, amlexit, amlfree, amlinit, amlint, amllen, amlload, amlmapio, amlmicrodelay, amlnew, amltag, amltake, amlunmapio, amlval, amlwalk \- ACPI interprter .SH SYNOPSIS .de PB .PP @@ -68,7 +68,7 @@ .PB void amlfree(void*) .PB -void amldelay(int microsec) +void amlmicrodelay(int µs) .PB int amlmapio(Amlio *io) .PB