2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
7 #include <proto/console.h>
9 #include "console_gcc.h"
11 AROS_LH1(LONG
, SetConSnip
,
12 AROS_LHA(APTR
, data
, A0
),
13 struct ConsoleBase
*, ConsoleDevice
, 10, Console
)
17 /* data = NUL-terminated string */
21 ObtainSemaphore(&ConsoleDevice
->copyBufferLock
);
23 FreeMem((APTR
) ConsoleDevice
->copyBuffer
,
24 ConsoleDevice
->copyBufferSize
);
25 ConsoleDevice
->copyBufferSize
= 0;
31 ConsoleDevice
->copyBuffer
= AllocMem(size
, MEMF_PUBLIC
);
32 if (ConsoleDevice
->copyBuffer
)
34 CopyMem(data
, (APTR
) ConsoleDevice
->copyBuffer
, size
);
35 ConsoleDevice
->copyBufferSize
= size
;
41 ReleaseSemaphore(&ConsoleDevice
->copyBufferLock
);