BAHAHAHAHAHAHAHAAAAA

This commit is contained in:
anon
2024-07-01 21:21:54 +02:00
parent 2c312ff1f4
commit 99e5ebf0be
2 changed files with 10 additions and 17 deletions

View File

@ -21,14 +21,12 @@ signed main() {
// It MUST be on the heap // It MUST be on the heap
stacktor<int> * s = new stacktor<int>(); stacktor<int> * s = new stacktor<int>();
puts("");
s->push_back(10); s->push_back(10);
puts("");
s->push_back(12); s->push_back(12);
puts("");
s->push_back(6); s->push_back(6);
puts("");
print_stractor(*s); print_stractor(*s);
puts("");
return 0; return 0;
} }

View File

@ -25,8 +25,6 @@ private:
int lock = 0; int lock = 0;
void bahaha() { void bahaha() {
int data_size = sizeof(T);
asm ( asm (
"movq %%rsp, %0;" "movq %%rsp, %0;"
: "=r" (data) : "=r" (data)
@ -34,18 +32,15 @@ private:
: :
); );
goto pass; while (not lock);
start: this->god_have_mercy();
asm volatile ( }
"sub %%rsp, %0;"
: void god_have_mercy() {
: "" (data_size) T prayers;
); --lock;
DEBUG_PRINT("Element allocated.");
--lock;
pass:
DEBUG_PRINT("Locking."); DEBUG_PRINT("Locking.");
while (not lock) { while (not lock) {
if (request != -1) { if (request != -1) {
@ -62,7 +57,7 @@ private:
return; return;
} }
} }
goto start; this->god_have_mercy();
} }
public: public: