mirror of
https://github.com/lexborisov/Modest
synced 2024-11-21 21:31:25 +03:00
Fix for creating a spinlock without support spinlock https://github.com/lexborisov/myhtml/issues/103
This commit is contained in:
parent
aa67db6fa1
commit
29cd7e1775
44
source/mycss/syntax/ending.h
Normal file
44
source/mycss/syntax/ending.h
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 2016-2017 Alexander Borisov
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Author: lex.borisov@gmail.com (Alexander Borisov)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MyCSS_SYNTAX_ENDING_H
|
||||||
|
#define MyCSS_SYNTAX_ENDING_H
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "mycss/myosi.h"
|
||||||
|
#include "mycss/mycss.h"
|
||||||
|
#include "mycss/entry.h"
|
||||||
|
|
||||||
|
bool mycss_syntax_endings_list_of_rules_return(mycss_entry_t* entry, mycss_token_t* token);
|
||||||
|
bool mycss_syntax_endings_list_of_rules_qualified_rule_left_qb(mycss_entry_t* entry, mycss_token_t* token);
|
||||||
|
bool mycss_syntax_endings_list_of_rules_at_rule_qb(mycss_entry_t* entry, mycss_token_t* token);
|
||||||
|
bool mycss_syntax_endings_component_value_and_simple_block_left_curly_bracket(mycss_entry_t* entry, mycss_token_t* token);
|
||||||
|
bool mycss_syntax_endings_component_value_and_simple_block_left_square_bracket(mycss_entry_t* entry, mycss_token_t* token);
|
||||||
|
bool mycss_syntax_endings_component_value_and_simple_block_left_parenthesis(mycss_entry_t* entry, mycss_token_t* token);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* MyCSS_SYNTAX_ENDING_H */
|
40
source/mycss/syntax/syntax.h
Normal file
40
source/mycss/syntax/syntax.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 2016-2017 Alexander Borisov
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Author: lex.borisov@gmail.com (Alexander Borisov)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MyCSS_SYNTAX_H
|
||||||
|
#define MyCSS_SYNTAX_H
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
//extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "mycss/myosi.h"
|
||||||
|
#include "mycss/mycss.h"
|
||||||
|
#include "mycss/entry.h"
|
||||||
|
#include "mycss/syntax_ending.h"
|
||||||
|
|
||||||
|
bool mycss_syntax_list_of_rules(mycss_entry_t* entry, mycss_token_t* token, bool last_response);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* MyCSS_SYNTAX_H */
|
39
source/mycss/syntax_ending.h
Normal file
39
source/mycss/syntax_ending.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 2016-2017 Alexander Borisov
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Author: lex.borisov@gmail.com (Alexander Borisov)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MyCSS_SYNTAX_ENDING_H
|
||||||
|
#define MyCSS_SYNTAX_ENDING_H
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
//extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "mycss/myosi.h"
|
||||||
|
#include "mycss/mycss.h"
|
||||||
|
#include "mycss/entry.h"
|
||||||
|
|
||||||
|
bool mycss_syntax_list_of_rules(mycss_entry_t* entry, mycss_token_t* token, bool last_response);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* MyCSS_SYNTAX_ENDING_H */
|
@ -47,7 +47,11 @@ static mcsync_status_t mcsync_static_atomic_unlock(void* spinlock)
|
|||||||
/* spinlock */
|
/* spinlock */
|
||||||
void * mcsync_spin_create(void)
|
void * mcsync_spin_create(void)
|
||||||
{
|
{
|
||||||
|
#ifndef MyCORE_MCSYNC_SPINLOCK_PRESENT
|
||||||
|
return mcsync_mutex_create();
|
||||||
|
#else
|
||||||
return mycore_calloc(1, sizeof(int));
|
return mycore_calloc(1, sizeof(int));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
mcsync_status_t mcsync_spin_init(void* spinlock)
|
mcsync_status_t mcsync_spin_init(void* spinlock)
|
||||||
|
Loading…
Reference in New Issue
Block a user